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。
範例
在下列範例中,會示範如何在處理集合內容的過程中鎖定 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