ForEachItem::IsSynchronized Property
Gets a Boolean that indicates whether access to the collection is synchronized (thread-safe).
Assembly: Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
Property Value
Type: System::BooleanTrue if access to the collection is synchronized (thread-safe); otherwise, false. The default is false.
Implements
ICollection::IsSynchronizedImplements ICollection.IsSynchronized. If a collection is thread safe, the IsSynchronized property returns true, and the programmer does not have to do anything to keep the collection thread safe.
If the property returns false, then the SyncRoot property returns an object that can be used with the C# lock keyword. For more information, see ICollection.IsSynchronized.
The ArrayList is a .NET Framework Class that inherits and implements the IsSynchronized property. The following code example shows how to synchronize an ArrayList, determine if an ArrayList is synchronized and use a synchronized ArrayList.
Sample Output:
myAL is not synchronized.
mySyncdAL is synchronized.