access properties dynamically
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hello, I want to access a property dynamically. e.g. [code] class A{ private int i; public int I{ get{return i;} } } [/code] now I have a instance of this class and I want to access in the way: instance.Get("I"); and this should return my i... I know that Reflection is the way to do that, but how? Regards Hansjörg
-
Hello, I want to access a property dynamically. e.g. [code] class A{ private int i; public int I{ get{return i;} } } [/code] now I have a instance of this class and I want to access in the way: instance.Get("I"); and this should return my i... I know that Reflection is the way to do that, but how? Regards Hansjörg