LocalizableAttribute(Boolean) 构造函数 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 LocalizableAttribute 类的新实例。
public:
 LocalizableAttribute(bool isLocalizable);public LocalizableAttribute (bool isLocalizable);new System.ComponentModel.LocalizableAttribute : bool -> System.ComponentModel.LocalizableAttributePublic 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