this
noun
say it: “THIS” /ðɪs/
A keyword that means the current object, used inside its own class.
What is this in C#?
this — A reference to the current object inside its instance code.
class Book
{
string title;
Book(string title)
{
this.title = title;
}
}
In a sentence
- “I wrote this.name = name; so the field gets the parameter's value.”
Level: Journeyman · More C# terms at this level
Updated