C# dynamically set property [duplicate]

objName.GetType().GetProperty("nameOfProperty").SetValue(objName, objValue, null)

Leave a Comment