[XmlRoot("ConfigurationRoot")]
public class XmlDBConfiguration
{
[XmlArray("Customers")]
[XmlArrayItem("Customer", typeof(Customer))]
public ArrayList _customers;
private Dictionary<string, Customer> _customerDictionary;}
是否有可能从另一个静态类或任何其他方式定义元素名称(在我的情况下它是ConfigurationRoot)?我想定义我的类将被序列化(在我的情况下,它是客户)以及。是否有可能在那里放置一个变量,并在创建实例时更改它?定义XmlRoot并用变量对其进行输入?
在此先感谢