K
KrishnaPriya C
Guest
In property grid i got error in declarations and definitions.Here i refer many websites.here is my code
private:bool _a;
private:String^ *_message;
[BrowsableAttribute(true)];
[DefaultValueAttribute(true)];
[CategoryAttribute("Appearance")];
[DescriptionAttribute("type1")];
[PropertyAttributes("property1")];
public:
property bool a {
double get() {
return _a;
}
void set( bool newx ) {
_a = newx;
}
property String^ *x {
String^ get() {
return _message;
}
void set( String^ newx ) {
_message = newx;
}
};
if i declare property means i have got error 1.IntelliSense: properties can only be members of managed classes
if i didnt put property means i have got error1.expected a ;.
Please i need an example code for the class
Continue reading...
private:bool _a;
private:String^ *_message;
[BrowsableAttribute(true)];
[DefaultValueAttribute(true)];
[CategoryAttribute("Appearance")];
[DescriptionAttribute("type1")];
[PropertyAttributes("property1")];
public:
property bool a {
double get() {
return _a;
}
void set( bool newx ) {
_a = newx;
}
property String^ *x {
String^ get() {
return _message;
}
void set( String^ newx ) {
_message = newx;
}
};
if i declare property means i have got error 1.IntelliSense: properties can only be members of managed classes
if i didnt put property means i have got error1.expected a ;.
Please i need an example code for the class
Continue reading...