A
Andrey
Hi,
Here's the problem:
Say a have a class, implementing an interface:
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
public class GraphClass : IGraphInterface
{
public string Property1 {
get {
return value1;
}
set {
value1 = value;
}
}
public string Property2 {
get {
return value2;
}
set {
value2 = value;
}
}
/*Some other code*/
}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Say, somewhere in my progarm i do the following:
IGraphInterface gc = new GraphClass();
Is there a way to get a list of properties (Property1, Property2, etc) along with their names
(if possible) from the instance 'gc', if it's referenced as interface, like in the example?
I can assume that yes, because it's done somehow by VS IDE, when you use UserControls, where you can
define a property which will appear in "Properties" toolbar.
Any ideas would be highly appreciated!
Thank you in advance,
Andrey
Here's the problem:
Say a have a class, implementing an interface:
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
public class GraphClass : IGraphInterface
{
public string Property1 {
get {
return value1;
}
set {
value1 = value;
}
}
public string Property2 {
get {
return value2;
}
set {
value2 = value;
}
}
/*Some other code*/
}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Say, somewhere in my progarm i do the following:
IGraphInterface gc = new GraphClass();
Is there a way to get a list of properties (Property1, Property2, etc) along with their names
(if possible) from the instance 'gc', if it's referenced as interface, like in the example?
I can assume that yes, because it's done somehow by VS IDE, when you use UserControls, where you can
define a property which will appear in "Properties" toolbar.
Any ideas would be highly appreciated!
Thank you in advance,
Andrey