Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C3903
Collapse the table of content
Expand the table of content

Compiler Error C3903

'property': does not have set or get method

A property must have at least a get or a set method. For more information, see property.

The following sample generates C3903:

// C3903.cpp
// compile with: /clr
ref class X {
   property int P {
      void f(int){}
      // Add one or both of the following lines.
      // void set(int){}
      // int get(){return 0;}
   };   // C3903

   property double Q[,,,,] {
      void f(){}
      // Add one or both of the following lines.
      // void set(int, char, int, char, double, double){}
      // double get(int, char, int, char, double){return 1.1;}
   }   // C3903
};

Community Additions

ADD
Show:
© 2015 Microsoft