根据我正在阅读的一本书,AttributeUsage的AllowMultiple公共(public)属性指定:...whetherthetargetcanhavemultipleinstancesoftheattributeappliedtoit.我为什么要/不想使用它? 最佳答案 属性是元数据。通常,您需要使用属性修饰成员或类型,以便跟踪有关它的一些信息。例如,PropertyGrid使用DescriptionAttribute来标记属性的描述:[Description("Thisismyproperty")]publicintM