This topic has not yet been rated - Rate this topic

Compiler Error CS0719 

Error Message

'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
   }
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ