LocalizableAttribute(Boolean) Konstruktor

Definisi

Menginisialisasi instans baru kelas LocalizableAttribute.

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

Parameter

isLocalizable
Boolean

true jika properti harus dilokalkan; jika tidak, false.

Contoh

Contoh berikut menandai properti sebagai perlu dilokalkan. Kode ini membuat baru LocalizableAttribute, menetapkan nilainya ke LocalizableAttribute.Yes, dan mengikatnya ke properti .

   [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

Berlaku untuk

Lihat juga