【发布时间】:2010-04-13 19:12:26
【问题描述】:
我的代码:
public class Contact
{
public string id{ get; set; }
public string contact_type_id { get; set; }
public string value{ get; set; }
public string person_id { get; set; }
public Contact()
{
}
}
public class Contact:Base.Contact
{
public ContactType ContactType { get; set; }
public Person Person {get; set;}
public Contact()
{
ContactType = new ContactType();
Person = new Person();
}
}
还有:
Contact c = new Contact();
Base.Contact cb = (Base.Contact)c;
问题:
The **cb** is set to **Contac** and not to **Base.Contact**.
Have any trick to do that????
【问题讨论】:
标签: c# silverlight casting extends