C
critter
I am trying to get a value of a property of a class, but not an
instance of the class. Using Reflection, I can find the class in my
assembly, and I can find the property of my class, however, I can't
figure out how to get the value of the property without instantiating
on object of the class type.
Here is a brief example of what I am trying to do. I have a form,
called MyForm. On the form, at design time I place a label and change
the text property of that label to "This is my label". Using reflection
I can find the MyForm type and I can find the label on the form, and I
can find that the label has a property named "Text". The problem is
that I can't figure out how to see that the value of the property named
"Text" is "This is my label".
I'd appreciate any help on determining if this is possible without
instantiating an instance of the type, and if so how?
Thanks,
Warren
instance of the class. Using Reflection, I can find the class in my
assembly, and I can find the property of my class, however, I can't
figure out how to get the value of the property without instantiating
on object of the class type.
Here is a brief example of what I am trying to do. I have a form,
called MyForm. On the form, at design time I place a label and change
the text property of that label to "This is my label". Using reflection
I can find the MyForm type and I can find the label on the form, and I
can find that the label has a property named "Text". The problem is
that I can't figure out how to see that the value of the property named
"Text" is "This is my label".
I'd appreciate any help on determining if this is possible without
instantiating an instance of the type, and if so how?
Thanks,
Warren