InkRecognizerCollection.GetEnumerator 方法
返回可循环访问集合的枚举数。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)
语法
声明
Public Function GetEnumerator As InkRecognizerCollection..::.InkRecognizerCollectionEnumerator
用法
Dim instance As InkRecognizerCollection
Dim returnValue As InkRecognizerCollection..::.InkRecognizerCollectionEnumerator
returnValue = instance.GetEnumerator()
public InkRecognizerCollection..::.InkRecognizerCollectionEnumerator GetEnumerator()
public:
InkRecognizerCollection..::.InkRecognizerCollectionEnumerator^ GetEnumerator()
public InkRecognizerCollection..::.InkRecognizerCollectionEnumerator GetEnumerator()
public function GetEnumerator() : InkRecognizerCollection..::.InkRecognizerCollectionEnumerator
返回值
类型:Microsoft.Ink.InkRecognizerCollection.InkRecognizerCollectionEnumerator
可用于循环访问集合的枚举数。
备注
此集合实现 ICollection 接口。有关此属性的更多信息,请参见 GetEnumerator。
示例
下面的示例使用 foreach 语句(在 Visual Basic 中为 For Each…Next)循环访问 InkRecognizerCollection (theInkRecognizerCollection)。foreach 语句调用内部代码中的 GetEnumerator 方法,该方法是编译器为支持此语句而生成的。
' Create a StringBuilder in which to collect the information.
Dim result As New System.Text.StringBuilder
result.AppendLine("Recognizers in the InkRecognizerCollection:" _
& System.Environment.NewLine)
' Iterate over the InkRecognizerCollection to collect information
' on each InkRecognizer.
For Each theRecognizer As Microsoft.Ink.InkRecognizer _
In theInkRecognizerCollection
' Use a helper method to get a string containing information
' on the InkRecognizer.
result.AppendLine(Me.GetInkRecognizerData(theRecognizer))
Next
// 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.
foreach (Microsoft.Ink.InkRecognizer theRecognizer
in theInkRecognizerCollection)
{
// Use a helper method to get a string containing information
// on the InkRecognizer.
result.AppendLine(this.GetInkRecognizerData(theRecognizer));
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0