CategoryAttribute 构造函数
定义
初始化 CategoryAttribute 类的新实例。Initializes a new instance of the CategoryAttribute class.
重载
| CategoryAttribute() |
使用类别名称"Default"初始化 CategoryAttribute 类的新实例。Initializes a new instance of the CategoryAttribute class using the category name Default. |
| CategoryAttribute(String) |
使用指定的类别名称初始化 CategoryAttribute 类的新实例。Initializes a new instance of the CategoryAttribute class using the specified category name. |
CategoryAttribute()
使用类别名称"Default"初始化 CategoryAttribute 类的新实例。Initializes a new instance of the CategoryAttribute class using the category name Default.
public:
CategoryAttribute();
public CategoryAttribute ();
Public Sub New ()
适用于
CategoryAttribute(String)
使用指定的类别名称初始化 CategoryAttribute 类的新实例。Initializes a new instance of the CategoryAttribute class using the specified category name.
public:
CategoryAttribute(System::String ^ category);
public CategoryAttribute (string category);
new System.ComponentModel.CategoryAttribute : string -> System.ComponentModel.CategoryAttribute
Public Sub New (category As String)
参数
- category
- String
类别的名称。The name of the category.
注解
如果为参数提供的名称 category 是预定义的类别名称之一,则该名称将自动由属性进行本地化 Category 。If the name you provide for the category parameter is one of the predefined category names, the name will be automatically localized by the Category property.
如果您提供的名称不是预定义的类别名称,并且您不重写该 GetLocalizedString 方法以提供本地化名称,则不会对该类别名称进行本地化。If the name you provide is not a predefined category name, and you do not override the GetLocalizedString method to provide a localized name, the category name will not be localized.