InkRecognizerCollection.GetEnumerator Method

Returns an enumerator that can iterate through the collection.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public Function GetEnumerator As InkRecognizerCollection.InkRecognizerCollectionEnumerator
'Usage
Dim instance As InkRecognizerCollection 
Dim returnValue As InkRecognizerCollection.InkRecognizerCollectionEnumerator 

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

Return Value

Type: Microsoft.Ink.InkRecognizerCollection.InkRecognizerCollectionEnumerator
An enumerator that can be used to iterate through the collection.

Remarks

This collection implements the ICollection interface. For more information about this property, see GetEnumerator.

Examples

The following example uses a foreach statement (For Each…Next in Visual Basic) to iterate through the InkRecognizerCollection, theInkRecognizerCollection. The foreach statement calls the GetEnumerator method in internal code that the compiler generates to support the statement.

' 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));
                }

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerCollection Class

InkRecognizerCollection Members

Microsoft.Ink Namespace