Answers for "c# get class property from string"

C#
0

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);
        }
    }
}
Posted by: Guest on September-23-2020

Code answers related to "c# get class property from string"

C# Answers by Framework

Browse Popular Code Answers by Language