Share via


LocalizablePropertyDescriptionAttribute.GetLocalizedValue メソッド

定義

のローカライズされた値を含む文字列を取得します LocalizablePropertyDescriptionAttribute

public:
 System::String ^ GetLocalizedValue();
public string GetLocalizedValue ();
member this.GetLocalizedValue : unit -> string
Public Function GetLocalizedValue () As String

戻り値

のローカライズされた値 LocalizablePropertyDescriptionAttributeを含む文字列。

次のコード例では、GetLocalizedValue メソッドを使用して、ユーザー インターフェイスで表示される名前として使用される文字列のローカライズされたバージョンを返しています。

public override string DisplayLocPropertyName  
{  
    {  
        AttributeCollection attributes = this.Attributes;  
            if ( null == attributes )  
                // Your code here.  
                LocalizablePropertyDescriptionAttribute localizablePropDescAttr = attributes[ typeof ( LocalizablePropertyDescriptionAttribute ) ] as LocalizablePropertyDescriptionAttribute;  
                if ( null == localizablePropDescAttr)  
                    // Return your data or value.  
                else   
                   // Return the localized description.  
                    return localizablePropertyDescAttribute.GetLocalizedValue();  
    }  
}  

適用対象