如何使用DataContract與繼承?下面的代碼會工作嗎?DataContract和繼承?
[DataContract]
public class ConsoleData
{
[DataMember]
public String Description { get; set; }
}
[DataContract]
public class SomeData : ConsoleData
{
[DataMember]
public int Volume { get; set; }
......
是的。你想用這兩個數據合約做什麼? – 2011-12-18 21:58:12