Compilerfehler C3264

Aktualisiert: November 2007

Fehlermeldung

'Klasse': Ein Klassenkonstruktor kann keinen Rückgabetyp haben
'class' : a class-constructor cannot have a return type

Klassenkonstruktoren verfügen grundsätzlich nicht über Rückgabetypen.

Im folgenden Beispiel wird C3264 generiert:

// C3264_2.cpp
// compile with: /clr

ref class X {
   public:
      static int X()   { // C3264
      }

      /* use the code below to resolve the error
      static X() {
      }
      */
};
int main() {
}

Im folgenden Beispiel wird C3264 generiert:

// C3264.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>

__gc class X {
   public:
      static int X()   { // C3264
      }

      /* use the code below to resolve the error
      static X() {
      }
      */
};
int main() {
}