I have an object with some types of properties:
public class MyClass
{
public List<SomeObj> List { get; set; }
public int SomeKey { get; set; }
public string SomeString { get; set; }
}
var obj = new MyClass();
What is the best way to get all types of properties for obj
instance of the MyClass
?
For example:
obj.GetAllPropertiesTypes() //int, string, List<>
obj.HasPropertyType("int") //True