Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0719

'type': array elements cannot be of static type

An array of static type does not make sense since array elements are instances, but it is not possible to create instances of static types.

The following sample generates CS0719:

// CS0719.cs
public static class SC
{
   public static void F()
   {
   }
}


public class CMain
{
   public static void Main()
   {
      SC[] sca = new SC[10];  // CS0719
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft