jeudi 8 décembre 2016

How to setup property access via string name parameter in .NET

How can I write extension method "SetPropValue" that it works like:

myObject.SetPropValue("Address") = "blahblah"

// which does:
myObject.Address = "blahblah"

And also "GetPropValue":

Object address = myObject.GetPropValue("Address")





Aucun commentaire:

Enregistrer un commentaire