InkRecognizerBaseCollection.GetEnumerator 方法

返回可循环访问集合的枚举数。

命名空间:  System.Windows.Ink.AnalysisCore
程序集:  IACore(在 IACore.dll 中)

语法

声明
Public Function GetEnumerator As InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator
用法
Dim instance As InkRecognizerBaseCollection
Dim returnValue As InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator

returnValue = instance.GetEnumerator()
public InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator GetEnumerator()
public:
InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator^ GetEnumerator()
public InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator GetEnumerator()
public function GetEnumerator() : InkRecognizerBaseCollection..::.InkRecognizerBaseCollectionEnumerator

返回值

类型:System.Windows.Ink.AnalysisCore.InkRecognizerBaseCollection.InkRecognizerBaseCollectionEnumerator
可用于循环访问集合的枚举数。

备注

此集合实现 System.Collections.ICollection 接口。有关此属性的更多信息,请参见 ICollection.GetEnumerator。

示例

下面的示例使用 foreach 语句(在 Visual Basic 中为 For Each…Next)循环访问 InkRecognizerBaseCollection (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 InkRecognizerBase _
    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 (System.Windows.Ink.AnalysisCore.InkRecognizerBase theRecognizer
                    in theInkRecognizerCollection)
                {
                    // Use a helper method to get a string containing information
                    // on the InkRecognizer.
                    result.AppendLine(this.GetInkRecognizerData(theRecognizer));
                }

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkRecognizerBaseCollection 类

InkRecognizerBaseCollection 成员

System.Windows.Ink.AnalysisCore 命名空间