Search⌘ K

The this Keyword and Extension Methods

Learn how the this keyword refers to the current class instance and how extension methods let you add new methods to existing types without modifying them. This lesson helps you understand these core C# concepts to write clearer, more flexible code in object-oriented programming.

What is the this keyword?

The this keyword refers to the current instance of the class. It helps qualify members hidden by the same name. The this keyword can also be ...