Delen via


Compilerfout C3917

'eigenschap': verouderde declaratiestijl van constructie

Opmerkingen

Een eigenschaps- of gebeurtenisdefinitie die de syntaxis van een versie vóór Visual Studio 2005 heeft gebruikt.

Zie de eigenschap voor meer informatie.

Example

In het volgende voorbeeld wordt C3917 gegenereerd:

// C3917.cpp
// compile with: /clr /c
public ref class  C {
private:
   int m_length;
public:
   C() {
      m_length = 0;
   }

   property int get_Length();   // C3917

   // The correct property definition:
   property int Length {
      int get() {
         return m_length;
      }

      void set( int i ) {
         m_length = i;
      }
   }
};