Compiler Error CS1108
A parameter cannot have all the specified modifiers; there are too many modifiers on the parameter.
Certain combinations of parameter modifiers, such as in
, ref
, and out
, are not allowed because they have mutually exclusive meanings for the compiler.
The following example generates CS1108:
// cs1108.cs
// Compile with: /target:library
public class Test
{
// Regular Instance Method.
public void TestMethod(ref out int i) {} // CS1108
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: