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