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
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error CS0721 

Error Message

'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:

// CS0721.cs
public static class SC
{
}


public class CMain
{
   public void F(SC sc)  // CS0721
   {
   }

   public static void Main()
   {
   }
}

Community Additions

ADD
Show:
© 2015 Microsoft