Assume that I have a dynamic variable:
dynamic d = *something*
Now, something creates properties to d
which I have on the other hand from a string array:
string[] strarray = { 'property1','property2',..... }
I dont know the property names in advance.
How in code, once d
is created and strarray is pulled from DB, can I get the values?
I want to get d.property1 , d.property2
.
I see that the object has a _dictionary
internal dictionary that contains the keys and the values, how do I retieve them?
Many thanks in advance for your help!
something
anIDynamicMetaObjectProvider
? – SLaks Dec 25 '11 at 21:00something
in the debugger and look at its public members. – SLaks Dec 26 '11 at 0:03d.GetType()
give you in runtime? – Tomislav Markovski Dec 26 '11 at 1:29