'property_accessor': 숫자 매개 변수를 지정해야 합니다.
비고
속성 차원에 대한 매개 get 변수 수와 set 메서드를 확인합니다.
메서드의 매개 변수
get수는 속성의 차원 수와 같거나 인덱스되지 않은 속성의 경우 0이어야 합니다.메서드의
set매개 변수 수는 속성의 차원 수보다 1개 이상이어야 합니다.
자세한 내용은 property을 참조하세요.
예제
다음 예제에서는 C3904를 생성합니다.
// C3904.cpp
// compile with: /clr /c
ref class X {
property int P {
// set
void set(); // C3904
// try the following line instead
// void set(int);
// get
int get(int, int); // C3904
// try the following line instead
// int get();
};
};
다음 예제에서는 C3904를 생성합니다.
// C3904b.cpp
// compile with: /clr /c
ref struct X {
property int Q[double, double, float, float, void*, int] {
// set
void set(double, void*); // C3904
// try the following line instead
// void set(double, double, float, float, void*, int, int);
// get
int get(); // C3904
// try the following line instead
// int get(double, double, float, float, void*, int);
}
};