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

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -