컴파일러 오류 C3137
'property': 속성을 초기화할 수 없습니다.
예를 들어 생성자의 초기화 목록에서 속성을 초기화할 수 없습니다.
다음 예제에서는 C3137을 생성합니다.
// C3137.cpp
// compile with: /clr /c
ref class CMyClass {
public:
property int Size {
int get() {
return 0;
}
void set( int i ) {}
}
CMyClass() : Size( 1 ) { // C3137
// to resolve this C3137, remove the initializer from the
// ctor declaration and perform the assignment as follows
// Size = 1;
}
};