共用方式為


InkRecognizerCollection.Count 屬性

取得集合中的元素數目。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)

語法

'宣告
Public ReadOnly Property Count As Integer
'用途
Dim instance As InkRecognizerCollection
Dim value As Integer

value = instance.Count
public int Count { get; }
public:
virtual property int Count {
    int get () sealed;
}
/** @property */
public final int get_Count()
public final function get Count () : int

屬性值

型別:System.Int32
集合中的元素數目。

實作

ICollection.Count

範例

在下列範例中,如果 InkRecognizerCollection (變數名稱為 theInkRecognizerCollection) 不是空集合,則會取得這個集合內的第一個辨識器。這個範例還會檢查集合是否同步。

' Create a collection of the recognizers installed on this Tablet PC.
Dim theInkRecognizerCollection As Microsoft.Ink.InkRecognizerCollection _
    = theInkAnalyzer.GetInkRecognizersByPriority()

' Check if there are recognizers in the collection.
If (0 < theInkRecognizerCollection.Count) Then
    ' Get the first recognizer in the collection.
    Dim theFirstInkRecognizer As Microsoft.Ink.InkRecognizer = _
        theInkRecognizerCollection.Item(0)

    ' Check if the recognizers collection is synchronized.
    If (theInkRecognizerCollection.IsSynchronized) Then
        ' Insert code here.
    End If
End If
            // Create a collection of the recognizers installed on this Tablet PC.
            Microsoft.Ink.InkRecognizerCollection theInkRecognizerCollection =
                theInkAnalyzer.GetInkRecognizersByPriority();

            // Check if there are recognizers in the collection.
            if (0 < theInkRecognizerCollection.Count)
            {
                // Get the first recognizer in the collection.
                Microsoft.Ink.InkRecognizer theFirstInkRecognizer =
                    theInkRecognizerCollection[0];

                // Insert code here.
            }

            // Check if the recognizers collection is synchronized.
            if (theInkRecognizerCollection.IsSynchronized)
            {
                // Insert code here.
            }

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkRecognizerCollection 類別

InkRecognizerCollection 成員

Microsoft.Ink 命名空間