Skip to content
Mehmet TAŞ edited this page Feb 26, 2022 · 1 revision

Custom Extension Methods in C#

Welcome to the "Custom Extension Methods in C#" wiki!

Extension methods, as the name suggests, are additional methods. Extension methods allow you to add new methods in the existing class or in the structure without modifying, deriving or recompiling the original class, struct or interface. Extension methods can be added to your own custom class, .NET framework classes, or third party classes or interfaces.

It is introduced in C# 3.0.

LINQ is built upon extension methods which comes in two syntactical flavors (The Query and the Method syntax) that operate on IEnumerable and IQeryable type.

The extension methods have a special symbol in intellisense of the Visual Studio, so that you can easily differentiate between class methods and extension methods.

Clone this wiki locally