Share via


LocalizablePropertyDescriptionAttribute.GetLocalizedValue 메서드

정의

지역화된 값을 포함하는 String을 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();  
    }  
}  

적용 대상