我有一个类(Customer),它拥有超过200个字符串变量作为属性。我使用带有key和value参数的方法。我尝试从xml文件中提供键和值。为此,value必须替换为Customer类的属性(字符串变量)。
即
Customer
{
public string Name{return _name};
public string Address{return _address};
}
CallInput
{
StringTempelate tempelate = new StringTempelate();
foreach(item in items)
tempelate .SetAttribure(item.key, item.Value --> //Say this value is Name, so it has to substitute Customer.Name
}
有可能吗?
https://stackoverflow.com/questions/1293549
复制相似问题