Recognizers.RecognizersEnumerator.MoveNext 方法
将枚举数索引移到集合中的下一对象。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Function MoveNext As Boolean
用法
Dim instance As Recognizers..::.RecognizersEnumerator
Dim returnValue As Boolean
returnValue = instance.MoveNext()
public bool MoveNext()
public:
virtual bool MoveNext() sealed
public final boolean MoveNext()
public final function MoveNext() : boolean
返回值
类型:System.Boolean
如果索引位置引用对象,则设置为 true;如果索引位置引用集合末尾,则设置为 false。
实现
备注
Recognizers.RecognizersEnumerator 支持循环访问 Recognizers 集合,并实现 IEnumerator 接口。
此方法继承自 MoveNext。
示例
此示例获取 Recognizers 集合的 System.Collections.IEnumerator,然后使用它遍历该集合。
' calling the constructor fills the collection with all known Recognizer objects
Dim allRecognizers As Recognizers = New Recognizers()
Dim recogNames As List(Of String) = New List(Of String)
Dim theEnumerator As IEnumerator = allRecognizers.GetEnumerator()
theEnumerator.Reset()
While (theEnumerator.MoveNext())
Dim theRecognizer As Recognizer = DirectCast(theEnumerator.Current, Recognizer)
recogNames.Add(theRecognizer.Name)
End While
// calling the constructor fills the collection with all known Recognizer objects
Recognizers allRecognizers = new Recognizers();
List<String> recogNames = new List<string>();
IEnumerator theEnumerator = allRecognizers.GetEnumerator();
theEnumerator.Reset();
while (theEnumerator.MoveNext())
{
Recognizer theRecognizer = (Recognizer)theEnumerator.Current;
recogNames.Add(theRecognizer.Name);
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0
另请参见
参考
Recognizers.RecognizersEnumerator 类