Compilerfehler CS0719
Aktualisiert: November 2007
Fehlermeldung
"Typ": Arrayelemente dürfen keinen statischen Typ aufweisen.
'type': array elements cannot be of static type
Ein Array vom Typ static ist nicht sinnvoll, da Arrayelemente Instanzen sind. Es ist jedoch nicht möglich, Instanzen vom Typ static zu erstellen.
Im folgenden Beispiel wird der Fehler CS0719 generiert.
// CS0719.cs
public static class SC
{
public static void F()
{
}
}
public class CMain
{
public static void Main()
{
SC[] sca = new SC[10]; // CS0719
}
}