C# Error CS1103 – The first parameter of an extension method cannot be of type ‘{0}’

C# Error

CS1103 – The first parameter of an extension method cannot be of type ‘{0}’

Reason for the Error & Solution

The first parameter of an extension method cannot be of type ‘type’.

The first parameter of an extension method cannot be a pointer type.

Example

The following example generates CS1103:

// cs1103.cs  
public static class Extensions  
{  
    public unsafe static char* Test(this char* charP) { return charP; } // CS1103  
}