Hi everybody. I'm trying to use reflection for some reason and I got into this problem.
class Service
{
public int ID {get; set;}
.
.
.
}
class CustomService
{
public Service srv {get; set;}
.
.
.
}
//main code
Type type = Type.GetType(typeof(CustomService).ToString());
PropertyInfo pinf = type.GetProperty("Service.ID"); // returns null
My problem is that I want to get a propery inside another property of the main object. Is there a simple way to this goal?
Thanks in Advance.