Delen via


Compilerfout C3914

een standaardeigenschap kan niet statisch zijn

Opmerkingen

Een standaardeigenschap is onjuist gedeclareerd. Zie Voor meer informatie : Eigenschappen gebruiken in C++/CLI.

Example

In het volgende voorbeeld wordt C3914 gegenereerd en ziet u hoe u dit kunt oplossen.

// C3914.cpp
// compile with: /clr /c
ref struct X {
   static property int default[int] {   // C3914
   // try the following line instead
   // property int default[int] {
      int get(int) { return 0; }
      void set(int, int) {}
   }
};