advantage in that it allows members to be passed in to the extension by reference (C# only allows by value). Allowing for the following; Dim x As String = "some string value" x.Reverse() Because Visual Basic allows the source object to be passed in by reference it is possible to make changes to the source object directly, without need to create another variable. It is also more intuitive as it works in a consistent fashion to existing methods of classes. Extension methods The new language feature of extension methods in C# 3.0, however, makes the latter code possible. This approach requires a static class and a static method, as follows. public static class Utility { public static string Reverse(this string input) { char[] chars = input.ToCharArray(); Array.Reverse(chars); return new String(chars); } } In the definition, the modifier 'this' before the first argument specifies that it's an extension method (in this case to the type 'string'). In a call, the first argument is not 'passed in' because it is already known as the 'calling' object (the object before the dot). The major difference between calling extension methods and calling static helper methods is that static methods are called in prefix notation, whereas extension methods are called in infix notation. The latter leads to more readable code when the result of one operation is used for another operation. With static methods HelperClass.Operation2(HelperClass.Operation1(x, arg1), arg2) With extension methods x.Operation1(arg1).Operation2(arg2) Naming conflicts in extension methods and instance methods In C# 3.0, both an instance method and an extension method with the same signature can exist for a class. In such a scenario, the instance method is preferred over the extension method. Neither the compiler nor the Microsoft Visual Studio IDE warns about the naming conflict. Consider this C# class, where the GetAlphabet() method is invoked on an instance of this class: class AlphabetMaker { public void GetAlphabet() { //When this method is implemented, Console.WriteLine("abc"); //it will shadow the implementation } //in the ExtensionMethods class. } static class ExtensionMethods { public static void GetAlphabet(this AlphabetMaker am) { //This will only be called Console.WriteLine("ABC"); //if there is no instance } //method with the same signature. } Result of invoking GetAlphabet() on an instance of AlphabetMaker if only the extension method exists: ABC Result if both the instance method and the extension method exist: abc See also UFCS, a way to use free functions as extension methods