我有一个像这样定义了两个自定义属性:将属性限制为类或属性可行吗?
internal class SchemaAttribute : Attribute {
internal SchemaAttribute(string schema) {
Schema = schema;
}
internal string Schema { get; private set; }
}
internal class AttributeAttribute : Attribute {
internal AttributeAttribute(string attribute) {
Attribute = attribute;
}
internal string Attribute { get; private set; }
}
我想给SchemaAttribute限制类和AttributeAttribute到属性。
这是可行的吗?
如果你发现我的问题,如果不够好,帮助别人,请给予好评。谢谢! =) – 2010-05-21 18:25:26