Answers for "c# get class of attribute"

C#
3

c# get class name by type

typeof(T).Name // class name, no namespace
typeof(T).FullName // namespace and class name
typeof(T).Namespace // namespace, no class name
Posted by: Guest on December-15-2020
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 of attribute"

C# Answers by Framework

Browse Popular Code Answers by Language