GetLocalizedValue メソッド

LocalizablePropertyDescriptionAttribute のローカライズされた値を表す String を取得します。

名前空間:  Microsoft.SqlServer.Dts.Runtime.Localization
アセンブリ:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS.dll)

構文

'宣言
Public Function GetLocalizedValue As String
'使用
Dim instance As LocalizablePropertyDescriptionAttribute
Dim returnValue As String

returnValue = instance.GetLocalizedValue()
public string GetLocalizedValue()
public:
String^ GetLocalizedValue()
member GetLocalizedValue : unit -> string 
public function GetLocalizedValue() : String

戻り値

型: System. . :: . .String
LocalizablePropertyDescriptionAttribute のローカライズされた値を表す String です。

使用例

次のコード例では、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();
    }
}