In article <20**********************************@microsoft.co m>,
Ra*********@discussions.microsoft.com says...
Well, IMHO, I think that unless you implement an interface in a class,
you won't have access to the inherited members. In this case,
the derived interface does not exist as such, so as to have the inherited members, hence returning null.
I'm sorry. I didn't mean to give that impression.
The classes which implement the interfaces have been defined
public class Employee : IEmployee
{
private string firstName;
private string lastName;
public string FirstName
{
get{return firstName;}
set{firstName = value;}
}
public string LastName
{
get{return lastName;}
set{lastName = value;}
}
}
public class HRMSEmployee : Employee, IHRMSEmployee
{
private string SSNum;
public string LastName
{
get{return ssNum;}
set{ssNum= value;}
}
}
and, as I said, when using classes
PropertyInfo propInfo = typeof(HRMSEmployee)GetProperty("LastName");
does return a value.
The question is why does
PropertyInfo propInfo = typeof(IHRMSEmployee)GetProperty("LastName");
not return a value.
Robert Zurer