支持循环访问 InkRecognizerCollection 的 System.Collections.IEnumerator 接口的实现。
命名空间: System.Windows.Ink
程序集: IAWinFX(在 IAWinFX.dll 中)
语法
声明
Public Class InkRecognizerCollectionEnumerator _
Implements IEnumerator
用法
Dim instance As InkRecognizerCollection.InkRecognizerCollectionEnumerator
public class InkRecognizerCollectionEnumerator : IEnumerator
public ref class InkRecognizerCollectionEnumerator : IEnumerator
public class InkRecognizerCollectionEnumerator implements IEnumerator
public class InkRecognizerCollectionEnumerator implements IEnumerator
备注
使用此枚举数可以通过只读方式访问被引用的 InkRecognizerCollection 中的元素。例如,Microsoft Visual Basic 和 C# 编程语言中的 foreach 语句(该语句循环访问集合的元素)从 InkRecognizerCollection 的实例检索 InkRecognizerCollection.InkRecognizerCollectionEnumerator,从而循环访问集合中的元素。
有关此类的更多信息,请参见 IEnumerator。
示例
下面的示例循环访问 InkRecognizerCollection,并返回有关集合 theInkRecognizerCollection 中所有 InkRecognizer 对象的信息。
' 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.
Dim enumerator As InkRecognizerCollection.InkRecognizerCollectionEnumerator _
= theInkRecognizerCollection.GetEnumerator()
While enumerator.MoveNext()
' Use a helper method to get a string containing information
' on the InkRecognizer.
result.AppendLine(Me.GetInkRecognizerData(enumerator.Current))
End While
// 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.
InkRecognizerCollection.InkRecognizerCollectionEnumerator enumerator =
theInkRecognizerCollection.GetEnumerator();
while (enumerator.MoveNext())
{
// Use a helper method to get a string containing information
// on the InkRecognizer.
result.AppendLine(this.GetInkRecognizerData(enumerator.Current));
}
继承层次结构
System.Object
System.Windows.Ink.InkRecognizerCollection.InkRecognizerCollectionEnumerator
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0
另请参见
参考
InkRecognizerCollection.InkRecognizerCollectionEnumerator 成员