LocalizableAttribute(Boolean) コンストラクター

定義

LocalizableAttribute クラスの新しいインスタンスを初期化します。

public:
 LocalizableAttribute(bool isLocalizable);
public LocalizableAttribute(bool isLocalizable);
new System.ComponentModel.LocalizableAttribute : bool -> System.ComponentModel.LocalizableAttribute
Public Sub New (isLocalizable As Boolean)

パラメーター

isLocalizable
Boolean

true プロパティをローカライズする必要がある場合。それ以外の場合は false

次の例では、ローカライズする必要があるプロパティをマークします。 このコードでは、新しい LocalizableAttributeを作成し、その値を LocalizableAttribute.Yes に設定して、プロパティにバインドします。

   [Localizable(true)]
   int get()
   {
      // Insert code here.
      return 0;
   }

   void set( int value )
   {
      // Insert code here.
   }
}

[Localizable(true)]
public int MyProperty
{
    get =>
        // Insert code here.
        0;
    set
    {
        // Insert code here.
    }
}
<Localizable(True)> _  
Public Property MyProperty() As Integer
    Get
        ' Insert code here.
        Return 0
    End Get
    Set
        ' Insert code here.
    End Set 
End Property

適用対象

こちらもご覧ください