Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Extension methods must be static.
Extension methods must be declared as static methods in a non-generic static class.
Example
The following example generates CS1105 because Test is not static:
// cs1105.cs
// Compile with: /target:library
public class Extensions
{
// Single type parameter.
public void Test<T>(this System.String s) {} //CS1105
}