Share via


InkRecognizerBaseCollection.SyncRoot Property

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

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public ReadOnly Property SyncRoot As Object
'Usage
Dim instance As InkRecognizerBaseCollection 
Dim value As Object 

value = instance.SyncRoot
public Object SyncRoot { get; }
public:
virtual property Object^ SyncRoot {
    Object^ get () sealed;
}
public final function get SyncRoot () : Object

Property Value

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

Implements

ICollection.SyncRoot

Remarks

This collection implements the System.Collections.ICollection interface. For more information about this property, see ICollection.SyncRoot.

Examples

The following example shows how to lock the InkRecognizerBaseCollection, theInkRecognizerCollection, while the contents of the collection are processed.

' Lock the InkRecognizerCollection.
SyncLock theInkRecognizers.SyncRoot
    ' Iterate over the locked collection. 
    For Each theInkRecognizer As System.Windows.Ink.AnalysisCore.InkRecognizerBase _
        In theInkRecognizers
        ' Insert code here. 
    Next 
End SyncLock
            // Lock the InkRecognizerCollection.
            lock (theInkRecognizers.SyncRoot)
            {
                // Iterate over the locked collection. 
                foreach (System.Windows.Ink.AnalysisCore.InkRecognizerBase theInkRecognizer
                    in theInkRecognizers)
                {
                    // Insert code here.
                }
            }

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerBaseCollection Class

InkRecognizerBaseCollection Members

System.Windows.Ink.AnalysisCore Namespace