我有一个list属性,它使用System.Attribute类进行修饰。是否可以在列表的属性级别包含检查以仅包含不同的值?
[ConfigSettingList(typeof(string),Description="Contains a list of supported handheld devices . Default is the below list .")]
public List<string> HandHeldDevices
{
get
{
if (_handHeldDevices == null)
{
_handHeldDevices = new List<string> { "Android", "webOS", "iPhone", "iPad", "iPod", "BlackBerry", "IEMobile", "Opera Mini" };
}
return _handHeldDevices;
}
}
private List<string> _handHeldDevices;
ConfigSettingList继承自System.Attribute。我想检查不同的值。