This documentation is archived and is not being maintained.

Compiler Error C2779

'declaration' : property methods can only be associated with non-static data members

The property extended attribute is incorrectly applied to a static data member.

Example

// C2779.cpp
struct A {
   static __declspec(property(put=PutProp))
      int prop;      // C2779
   int PutProp(void);
};
Show: