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 類別