而且用起来也不会相互影响干扰
属性类用在[]中,放到指定允许的target前面,一般类就不行了
例如
[C#]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
   | AttributeTargets.Struct | AttributeTargets.Constructor |
   AttributeTargets.Method)]
[Serializable]
public sealed class SecurityPermissionAttribute :
   CodeAccessSecurityAttribute
说明该属性只能用在类,Struct,Constructor,Method前面