다음을 통해 공유


컴파일러 오류 C2779

'declaration': 속성 메서드는 비정적 데이터 멤버와만 연결할 수 있습니다.

property 확장된 특성이 정적 데이터 멤버에 잘못 적용되었습니다.

다음 샘플에서는 C2779를 생성합니다.

// C2779.cpp
struct A {
   static __declspec(property(put=PutProp))
   // try the following line instead
   __declspec(property(put=PutProp))
      int prop;   // C2779
   int PutProp(void);
};