Recognizers.RecognizersEnumerator.Reset 方法
将枚举数索引重置为 Recognizers 集合的开始位置。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Sub Reset
用法
Dim instance As Recognizers..::.RecognizersEnumerator
instance.Reset()
public void Reset()
public:
virtual void Reset() sealed
public final void Reset()
public final function Reset()
实现
备注
Recognizers.RecognizersEnumerator 类支持循环访问 Recognizers 集合,并实现 IEnumerator 接口。
此方法继承自 Reset 方法。
示例
此示例获取 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 类