Freigeben über


ValidatorCollection.IsSynchronized-Eigenschaft

Ruft einen Wert ab, der angibt, ob die ValidatorCollection-Auflistung synchronisiert ist.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

Syntax

'Declaration
Public ReadOnly Property IsSynchronized As Boolean
'Usage
Dim instance As ValidatorCollection
Dim value As Boolean

value = instance.IsSynchronized
public bool IsSynchronized { get; }
public:
virtual property bool IsSynchronized {
    bool get () sealed;
}
/** @property */
public final boolean get_IsSynchronized ()
public final function get IsSynchronized () : boolean

Eigenschaftenwert

true, wenn die Auflistung synchronisiert ist, andernfalls false.

Hinweise

Wenn die Auflistung synchronisiert ist, ist diese threadsicher.

Beispiel

Im folgenden Codebeispiel wird die Verwendung der IsSynchronized-Eigenschaft veranschaulicht.

' Get 'Validators' of the page to myCollection.
Dim myCollection1 As ValidatorCollection = Page.Validators
' Get 'IsReadOnly' property of 'ValidatorCollection'.
Dim readOnly_bool As Boolean = myCollection1.IsReadOnly

' Get 'IsSynchronized' property of 'ValidatorCollection'.
Dim synchronized_bool As Boolean = myCollection1.IsSynchronized

' Get a synchronized object of the 'ValidatorCollection'.
Dim myCollection2 As ValidatorCollection = CType(myCollection1.SyncRoot, ValidatorCollection)
myCollection1.Add(myCollection1(0))
// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection1 = Page.Validators;

// Get 'IsReadOnly' property of 'ValidatorCollection'.
bool readOnly_bool = myCollection1.IsReadOnly;

// Get 'IsSynchronized' property of 'ValidatorCollection'.
bool synchronized_bool = myCollection1.IsSynchronized;

// Get a synchronized object of the 'ValidatorCollection'.
ValidatorCollection myCollection2 = (ValidatorCollection)myCollection1.SyncRoot;
myCollection1.Add(myCollection1[0]);
// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection1 = get_Validators();
// Get 'IsReadOnly' property of 'ValidatorCollection'.
boolean readOnly_bool = myCollection1.get_IsReadOnly();
// Get 'IsSynchronized' property of 'ValidatorCollection'.
boolean synchronized_bool = myCollection1.get_IsSynchronized();
// Get a synchronized object of the 'ValidatorCollection'.
ValidatorCollection myCollection2 = (ValidatorCollection)(
    myCollection1.get_SyncRoot());
myCollection1.Add(myCollection1.get_Item(0));

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

ValidatorCollection-Klasse
ValidatorCollection-Member
System.Web.UI-Namespace