Sdílet prostřednictvím


Compilerfehler CS1547

Aktualisiert: November 2007

Fehlermeldung

Das void-Schlüsselwort kann in diesem Kontext nicht verwendet werden.
Keyword 'void' cannot be used in this context

Der Compiler hat eine nicht zulässige Verwendung des void-Schlüsselworts entdeckt.

Im folgenden Beispiel wird CS1547 generiert:

// CS1547.cs
public class MyClass
{
   void BadMethod()
   {
      void i;   // CS1547, cannot have variables of type void
   }

   public static void Main()
   {
   }
}