Metoda LocalizablePropertyDescriptionAttribute.GetLocalizedValue
Pobiera ciąg zawierające wartość zlokalizowaną LocalizablePropertyDescriptionAttribute.
Przestrzeń nazw: Microsoft.SqlServer.Dts.Runtime.Localization
Zestaw: Microsoft.SqlServer.ManagedDTS (w Microsoft.SqlServer.ManagedDTS.dll)
Składnia
'Deklaracja
Public Function GetLocalizedValue As String
'Użycie
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
Wartość zwracana
Typ: System.String
A ciąg zawierające wartość zlokalizowaną LocalizablePropertyDescriptionAttribute.
Przykłady
Następujący kod w przykładzie wykorzystano GetLocalizedValue Metoda zwraca zlokalizowaną wersja ciąg używany jako nazwa wyświetlana w interfejs użytkownika.
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();
}
}