InkRecognizerCollection.SyncRoot 属性

获取可用于同步对集合的访问的对象。

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public ReadOnly Property SyncRoot As Object
用法
Dim instance As InkRecognizerCollection
Dim value As Object

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

属性值

类型:System.Object
可用于同步对集合的访问的对象。

实现

ICollection.SyncRoot

备注

此集合实现 ICollection 接口。有关此属性的更多信息,请参见 SyncRoot

示例

下面的示例演示如何在处理 InkRecognizerCollection (theInkRecognizerCollection) 集合的内容时锁定该集合。

' Lock the InkRecognizerCollection.
SyncLock theInkRecognizers.SyncRoot

    ' Iterate over the locked collection.
    For Each theInkRecognizer As InkRecognizer In theInkRecognizers
        ' Insert code here.
    Next theInkRecognizer

End SyncLock
// Lock the InkRecognizerCollection.
lock (theInkRecognizers.SyncRoot)
{
    // Iterate over the locked collection.
    foreach (InkRecognizer theInkRecognizer
        in theInkRecognizers)
    {
        // Insert code here.
    }
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkRecognizerCollection 类

InkRecognizerCollection 成员

System.Windows.Ink 命名空间