Compiler Error CS0721
'type': static types cannot be used as parameters
A static type is not meaningful as a parameter. Since no instances of static types may be created, no instance could ever be passed as a parameter.
The following sample generates CS0721:
C#
// CS0721.cs
public static class SC
{
}
public class CMain
{
public void F(SC sc) // CS0721
{
}
public static void Main()
{
}
}
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: