c# - Get dynamic property from Settings -


i've got few properties stored in appconfig , want access them dynamically (e.g. in loop or function).

accessing values using mysettings.name_of_that_thing no problem, if name variable?

i tried:

string propertyvalue = mysettings.gettype().getproperty("name_of_that_thing").tostring(); 

but thing got name of property. how can this?

string propertyvalue = mysettings.gettype() .getproperty("name_of_that_thing") .getvalue(mysettings, null); //replace mysettings null in getvalue(...) if mysettings  static class 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -