Extension Methods

Extension methods are methods that add functionality to .NET types or types that you have defined. For example, you can extend the System.String class by adding a Reverse method that reverses the string. The following program shows an example of an extension method. using System; namespace Read more