Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Compiler Error CS1100

Visual Studio 2008

Method 'name' has a parameter modifier 'this' which is not on the first parameter.

The this modifier is allowed only on the first parameter of a method, which indicates to the compiler that the method is an extension method.

To correct this error

  • Remove the this modifier from all except the first parameter of the method.

The following code generates CS1100 because a this parameter is modifying the second parameter:

// cs1100.cs
static class Test
{
    static void ExtMethod(int i, this Test c) // CS1100
    {
    }
}

Community Additions

ADD
Show:
© 2015 Microsoft