LocalizableAttribute(Boolean) Konstruktor

Definition

Initialisiert eine neue Instanz der LocalizableAttribute-Klasse.

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

truewenn eine Eigenschaft lokalisiert werden soll; andernfalls . false

Beispiele

Im folgenden Beispiel wird eine Eigenschaft als lokalisiert markiert. Dieser Code erstellt einen neuen LocalizableAttribute, legt seinen Wert auf LocalizableAttribute.Yesund bindet ihn an die Eigenschaft.

   [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

Gilt für:

Weitere Informationen