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 property ["propertyname"] ? To reach the value of the property by name,

you must use reflection:

  var propInfo = obj.GetType (). GetProperty (propertyName); Var value = propInfo.GetValue (obj);    

Comments

Popular posts from this blog

php - how to change mysql_result($res, 0, "url"); to mysqli -

c# - Textbox not clickable but editable -

Matlab transpose a table vector -