次の方法で共有


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?cNext) を使用して、InkRecognizerCollection、theInkRecognizerCollection を反復処理します。コンパイラがステートメントをサポートするために生成する内部コードで、foreach ステートメントが 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 名前空間