2012-09-06 28 views

回答

9
bool b = type.GetProperty("MyProp") 
      .GetCustomAttributes(false) 
      .Any(a => a is XmlIgnoreAttribute); 
0
typeof(string).GetProperty("Length").GetCustomAttributes(typeof(some attr)) 
相关问题