LocalizablePropertyDescriptionAttribute.GetLocalizedValue メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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();
}
}