[XmlRoot("ConfigurationRoot")]
public class XmlDBConfiguration
{
[XmlArray("Customers")]
[XmlArrayItem("Customer", typeof(Customer))]
public ArrayList _customers;
private Dictionary<string, Customer> _customerDictionary;}
是否有可能從另一個靜態類或任何其他方式定義元素名稱(在我的情況下它是ConfigurationRoot)?我想定義我的類將被序列化(在我的情況下,它是客戶)以及。是否有可能在那裏放置一個變量,並在創建實例時更改它?定義XmlRoot並用變量對其進行輸入?
在此先感謝