c# call access with property["propertyname"] (equal to JavaScript) -
How can I use a property property in C # with the name of the property? Like I do it in javascript in you must use reflection: property ["propertyname"] ? To reach the value of the property by name,
var propInfo = obj.GetType (). GetProperty (propertyName); Var value = propInfo.GetValue (obj);
Comments
Post a Comment