Export (0) Print
Expand All

TabletDeviceCollection.SyncRoot Property

Gets an object that can be used to synchronize access to the collection.

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

public Object SyncRoot { get; }

Property Value

Type: System.Object
An object that can be used to synchronize access to the collection.

Implements

ICollection.SyncRoot

The following example demonstrates the SyncRoot property.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft