Sup Guys,
On my Bussiness Layer, I have something like
Dim object as New ExampleObject
Where ExampleObject
inherits BaseExampleObject
.
I want to know how can I access ExampleObject
Propert开发者_高级运维ies by reflection on my BaseExampleObject
.
Something like:
MyBase.GetType.GetProperty("PropertyName").GetValue(mybase.gettype, Nothing)
Of course thats not going to work because this is not an instance of an object and if I instantiate a new object, I'll lose the reference from my Bussiness Layer.
Anyone got a hint?
Thanks
cast your BaseExampleObject to ExampleObject:
BaseExampleObject b;
b = new ExampleObject();
((ExampleObject)b).Something();
精彩评论