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.
      return 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

適用於

另請參閱