I\'d like to access the value of a dynamic c# property with a string:
dynamic
dynamic d = new { value1 = \"some\", value2 = \"random\", value3 = \"value\"
Similar to the accepted answer, you can also try GetField instead of GetProperty.
GetField
GetProperty
d.GetType().GetField("value2").GetValue(d);
Depending on how the actual Type was implemented, this may work when GetProperty() doesn't and can even be faster.
Type