共用方式為


InkRecognizerCollection.GetEnumerator 方法

傳回您可以用來逐一查看集合的列舉值。

命名空間:  System.Windows.Ink
組件:  IAWinFX (在 IAWinFX.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

傳回值

型別:System.Windows.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:" & Environment.NewLine)

' Iterate over the InkRecognizerCollection to collect information
' on each InkRecognizer.
For Each theRecognizer As InkRecognizer In theInkRecognizerCollection

    ' Use a helper method to get a string containing information
    ' on the InkRecognizer.
    result.AppendLine(Me.GetInkRecognizerData(theRecognizer))

Next theRecognizer
// 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 (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 成員

System.Windows.Ink 命名空間