共用方式為


InkRecognizerBaseCollection.GetEnumerator 方法

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

命名空間:  System.Windows.Ink.AnalysisCore
組件:  IACore (在 IACore.dll 中)

語法

'宣告
Public Function GetEnumerator As InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator
'用途
Dim instance As InkRecognizerBaseCollection
Dim returnValue As InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator

returnValue = instance.GetEnumerator()
public InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator GetEnumerator()
public:
InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator^ GetEnumerator()
public InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator GetEnumerator()
public function GetEnumerator() : InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator

傳回值

型別:System.Windows.Ink.AnalysisCore.InkRecognizerBaseCollection.InkRecognizerBaseCollectionEnumerator
可用來逐一查看集合的列舉值。

備註

這個集合會實作 System.Collections.ICollection 介面。如需這個屬性的詳細資訊,請參閱 ICollection.GetEnumerator。

範例

下列範例會使用 foreach 陳述式 (Statement) (在 Visual Basic 中為 For Each…Next) 逐一查看 InkRecognizerBaseCollection (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 InkRecognizerBase _
    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 (System.Windows.Ink.AnalysisCore.InkRecognizerBase theRecognizer
                    in theInkRecognizerCollection)
                {
                    // Use a helper method to get a string containing information
                    // on the InkRecognizer.
                    result.AppendLine(this.GetInkRecognizerData(theRecognizer));
                }

平台

Windows Vista, Windows XP SP2, Windows Server 2003

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkRecognizerBaseCollection 類別

InkRecognizerBaseCollection 成員

System.Windows.Ink.AnalysisCore 命名空間