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.

適用於