Share via


InkRecognizerCollection.GetEnumerator Method

Returns an enumerator that you can use to iterate through the collection.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.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: System.Windows.Ink.InkRecognizerCollection.InkRecognizerCollectionEnumerator
An enumerator that you can use 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:" & 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));
}

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

System.Windows.Ink Namespace