C# Error
CS0719 – ‘{0}’: array elements cannot be of static type
Reason for the Error & Solution
‘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
}
}