Share via


InkRecognizerCollection.GetEnumerator Method

Returns an enumerator that can iterate through the collection.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)

Syntax

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

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

Return Value

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.

Example

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerCollection Class
InkRecognizerCollection Members
System.Windows.Ink Namespace