【发布时间】:2011-02-22 11:41:44
【问题描述】:
我有两个这样定义的自定义属性:
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 限制为属性。
这可行吗?
【问题讨论】:
-
如果您发现我的问题足以帮助其他人,请点赞。谢谢! =)
标签: c# vb.net .net-2.0 attributes custom-attributes