InkRecognizerBaseCollection.SyncRoot 属性
获取可用于同步对集合的访问的对象。
命名空间: System.Windows.Ink.AnalysisCore
程序集: IACore(在 IACore.dll 中)
语法
声明
Public ReadOnly Property SyncRoot As Object
用法
Dim instance As InkRecognizerBaseCollection
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
可用于同步对集合的访问的对象。
实现
备注
此集合实现 System.Collections.ICollection 接口。有关此属性的更多信息,请参见 ICollection.SyncRoot。
示例
下面的示例演示如何在处理 InkRecognizerBaseCollection (theInkRecognizerCollection) 集合的内容时锁定该集合。
' 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.
}
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0