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

適用於

另請參閱