RecognitionAlternates.RecognitionAlternatesEnumerator.MoveNext 方法
将枚举数索引移到集合中的下一对象。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Function MoveNext As Boolean
用法
Dim instance As RecognitionAlternates..::.RecognitionAlternatesEnumerator
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。
实现
备注
RecognitionAlternates.RecognitionAlternatesEnumerator 支持循环访问 RecognitionAlternates 集合,并实现 IEnumerator 接口。
此方法继承自 MoveNext。
示例
此示例获取 RecognitionAlternates 集合的 System.Collections.IEnumerator,然后使用它遍历该集合。
Dim inkRecogAlternates As List(Of String) = New List(Of String)
' get the RecognitionAlternates from the RecognitionResult object
Dim mAlternates As RecognitionAlternates = mRecognitionResult.GetAlternatesFromSelection()
' get the enumerator
Dim iEnum As RecognitionAlternates.RecognitionAlternatesEnumerator = mAlternates.GetEnumerator()
iEnum.Reset()
' traverse the collection
While iEnum.MoveNext()
Dim theRecognitionAlternate As RecognitionAlternate = iEnum.Current
inkRecogAlternates.Add(theRecognitionAlternate.ToString())
End While
List<String> inkRecogAlternates = new List<string>();
// get the RecognitionAlternates from the RecognitionResult object
RecognitionAlternates mAlternates = mRecognitionResult.GetAlternatesFromSelection();
// get the enumerator
RecognitionAlternates.RecognitionAlternatesEnumerator iEnum = mAlternates.GetEnumerator();
iEnum.Reset();
// traverse the collection
while (iEnum.MoveNext())
{
RecognitionAlternate theRecognitionAlternate = iEnum.Current;
inkRecogAlternates.Add(theRecognitionAlternate.ToString());
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0
另请参见
参考
RecognitionAlternates.RecognitionAlternatesEnumerator 类