TabletDeviceCollection.IsSynchronized Property

 

Gets a value that indicates whether access to the collection is synchronized (thread safe).

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public bool IsSynchronized { get; }

Property Value

Type: System.Boolean

true if access to the collection is synchronized (thread safe); otherwise, false. The default is false.

The following example demonstrates the IsSynchronized property.

// Is the collection thread safe?        
if (!myTabletDeviceCollection.IsSynchronized)
{
    // If not, use SyncRoot to lock access
    lock (myTabletDeviceCollection.SyncRoot)
    {
        // work with collection
    }
}

.NET Framework
Available since 3.0
Return to top
Show: