Sdílet prostřednictvím


Compilerfehler CS0503

Aktualisiert: November 2007

Fehlermeldung

Die abstrakte Methode "Methode" kann nicht als "virtual" gekennzeichnet sein.
The abstract method 'method' cannot be marked virtual

Eine Membermethode sowohl als abstrakt und als virtuell zu markieren ist redundant, da mit abstract auch virtual impliziert wird.

Im folgenden Beispiel wird CS0503 generiert:

// CS0503.cs
namespace x
{
   abstract public class clx
   {
      abstract virtual public void f();   // CS0503
   }
}