Have you failed a job interview?
Send us your job interview questions and get correct answers.
What is 'this' keyword used for in C#?
Experience Level: Junior
'this' keyword works like a reference to an object that holds the method that is currently being executed. In the example below the 'this' keyword is used to refer to the property VolumeLevel. The keyword 'this' is not needed most of the time, so whenever you see it, you should be thinking whether the keyword is really needed and whether it couldn't be removed.
Related C# job interview questions
What is happening and in what order when a new object in being created C#?C# Junior
What is 'return' keyword used for in C#?C# Junior
In C# how do you call one method from another method where both method are inside of the same class?C# Junior
What is an attribute in C#?C# Junior
What must every method have in C#?C# Junior