LocalizablePropertyDescriptionAttribute.GetLocalizedValue Method
Gets a String containing the localized value of the LocalizablePropertyDescriptionAttribute.
命名空間: Microsoft.SqlServer.Dts.Runtime.Localization
組件: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
語法
'宣告
Public Function GetLocalizedValue As String
public string GetLocalizedValue ()
public:
String^ GetLocalizedValue ()
public String GetLocalizedValue ()
public function GetLocalizedValue () : String
傳回值
A String containing the localized value of the LocalizablePropertyDescriptionAttribute.
範例
The following code example uses the GetLocalizedValue method to return a localized version of the string to be used as the displayed name in a user interface.
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();
}
}
執行緒安全性
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
LocalizablePropertyDescriptionAttribute Class
LocalizablePropertyDescriptionAttribute Members
Microsoft.SqlServer.Dts.Runtime.Localization Namespace