> public static class MyExtensions > { > public static string AddOn(this string s, string s1) > { > return s + s1; > } > }then
string str = "Hello".AddOn(" Fred");is just syntatic sugar for
string str = MyExtensions.AddOn("Hello", " Fred");i.e. as far as the compiler is concerned they are identical