2
在C++/CLI,according to the documentation,你可以定义属性,例如:你如何用C定义非内联属性++/CLI
public ref class Vector sealed {
public:
property double x {
double get() {
return _x;
}
void set(double newx) {
_x = newx;
}
} // Note: no semi-colon
};
但是,如果你只是原型的属性是这样的:
public ref class Vector sealed {
public:
property double x {
double get() ;
void set(double newx);
} // Note: no semi-colon
};
你将如何去创建这些原型的实现?