CategoryAttribute.GetLocalizedString(String) 方法

定義

查閱指定分類的當地語系化名稱。Looks up the localized name of the specified category.

protected:
 virtual System::String ^ GetLocalizedString(System::String ^ value);
protected virtual string GetLocalizedString (string value);
abstract member GetLocalizedString : string -> string
override this.GetLocalizedString : string -> string
Protected Overridable Function GetLocalizedString (value As String) As String

參數

value
String

所要查閱分類的識別項。The identifer for the category to look up.

傳回

分類的當地語系化名稱,或者如果沒有當地語系化名稱時則為 nullThe localized name of the category, or null if a localized name does not exist.

備註

當第一次存取時,Category 屬性會呼叫這個方法,以查閱指定分類的當地語系化名稱。The Category property calls this method the first time it is accessed to look up the localized name for the specified category.

給繼承者的注意事項

覆寫此方法,將您自己的當地語系化名稱新增至類別。Override this method to add your own localized names to categories. 如果當地語系化的字串可供指定的值使用,則方法應該傳回它。If a localized string is available for the given value, the method should return it. 否則,請呼叫基類的 GetLocalizedString(String) 方法,讓基底類別將字串當地語系化。Otherwise, call the base class's GetLocalizedString(String) method to let the base class localize the string.

適用於