我想检查propertyInfo以确定XmlIgnore属性是否应用于给定的属性。我该怎么做呢?
发布于 2012-09-06 15:09:27
bool b = type.GetProperty("MyProp")
.GetCustomAttributes(false)
.Any(a => a is XmlIgnoreAttribute);发布于 2012-09-06 15:11:49
typeof(string).GetProperty("Length").GetCustomAttributes(typeof(some attr))https://stackoverflow.com/questions/12294656
复制相似问题