共用方式為


InkRecognizerCollection.GetEnumerator 方法

傳回可逐一查看集合的列舉值。

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

語法

'宣告
Public Function GetEnumerator As InkRecognizerCollection..::.InkRecognizerCollectionEnumerator
'用途
Dim instance As InkRecognizerCollection
Dim returnValue As InkRecognizerCollection..::.InkRecognizerCollectionEnumerator

returnValue = instance.GetEnumerator()
public InkRecognizerCollection..::.InkRecognizerCollectionEnumerator GetEnumerator()
public:
InkRecognizerCollection..::.InkRecognizerCollectionEnumerator^ GetEnumerator()
public InkRecognizerCollection..::.InkRecognizerCollectionEnumerator GetEnumerator()
public function GetEnumerator() : InkRecognizerCollection..::.InkRecognizerCollectionEnumerator

傳回值

型別:Microsoft.Ink.InkRecognizerCollection.InkRecognizerCollectionEnumerator
可用來逐一查看集合的列舉值。

備註

這個集合會實作 ICollection (英文) 介面。如需這個屬性的詳細資訊,請參閱 GetEnumerator (英文)。

範例

下列範例會使用 foreach 陳述式 (在 Visual Basic 中為 For Each…Next) 逐一查看 InkRecognizerCollection (變數名稱為 theInkRecognizerCollection)。foreach 陳述式會呼叫編譯器 (Compiler) 所產生用來支援陳述式的內部程式碼中的 GetEnumerator 方法。

' Create a StringBuilder in which to collect the information.
Dim result As New System.Text.StringBuilder
result.AppendLine("Recognizers in the InkRecognizerCollection:" _
    & System.Environment.NewLine)

' Iterate over the InkRecognizerCollection to collect information
' on each InkRecognizer.
For Each theRecognizer As Microsoft.Ink.InkRecognizer _
    In theInkRecognizerCollection
    ' Use a helper method to get a string containing information
    ' on the InkRecognizer.
    result.AppendLine(Me.GetInkRecognizerData(theRecognizer))
Next
                // Create a StringBuilder in which to collect the information.
                System.Text.StringBuilder result = new System.Text.StringBuilder();
                result.AppendLine("Recognizers in the InkRecognizerCollection:"
                    + Environment.NewLine);

                // Iterate over the InkRecognizerCollection to collect information
                // on each InkRecognizer.
                foreach (Microsoft.Ink.InkRecognizer theRecognizer
                    in theInkRecognizerCollection)
                {
                    // Use a helper method to get a string containing information
                    // on the InkRecognizer.
                    result.AppendLine(this.GetInkRecognizerData(theRecognizer));
                }

平台

Windows Vista

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkRecognizerCollection 類別

InkRecognizerCollection 成員

Microsoft.Ink 命名空間