locate property on class based on string value c# code example
Example: find class property with string C#
//Add this to class
public class MyClass
{
public object this[string property]
{
get
{
return typeof(security).GetProperty(property).GetValue(this, null);
}
set
{
typeof(security).GetProperty(property).SetValue(this, value, null);
}
}
}