See this code
public class Person
{
public int Id { get; set; }
public string Firstname { get; set; }
public string Lastname { get; set; }
public Dictionary<long,float> No {get;set;}
public DateTime BirthDate { get; set; }
}
public class Manager
{
public int Id { get; set; }
public User User { get; set; }
public List<User> Users { get; set; }
}
public class User
{
public int Id { get; set; }
public Person Person { get; set; }
public List<string> Phones { get; set; }
}
How to find all types that used in specific type properties recursively ? for example
GetAllInternalTypes(typeof(Manager))
Result for Manager: (Manager => User => Person)
- int
- User
- List< User >
- Person
- List< string >
- string
- DateTime
- Dictionary< long,float >
- long
- float
I want to find all used Types of an specific type recursively.
,Tuple>>,DateTime,List
– HamedFathi Feb 18 '17 at 10:24>>