Compilerfehler CS0500
Aktualisiert: November 2007
Fehlermeldung
"Klassenmember" kann keinen Text deklarieren, weil er als abstrakt markiert ist.
'class member' cannot declare a body because it is marked abstract
Eine abstract-Methode kann nicht ihre eigene Implementierung enthalten.
Im folgenden Beispiel wird CS0500 generiert:
// CS0500.cs
namespace x
{
abstract public class clx
{
abstract public void f(){} // CS0500
// try the following line instead
// abstract public void f();
}
public class cly
{
public static int Main()
{
return 0;
}
}
}