我在可反序列化的类文件中有这样的类和继承,如下所示。我想创建另一个名为VendorBase
的类
名为Vendor
的Xml属性。我希望我的Customer
类继承它。我怎样才能实现它?
public class Customer : CustomerBase
{
[XmlAttribute(AttributeName = "Customer")]
public string Customer { get; set; }
[XmlAttribute(AttributeName = "FieldValue")]
public string FieldValue { get; set; }
}
public class VendorBase
{
[XmlAttribute(AttributeName = "Vendor")]
public string Vendor { get; set; }
}