Tablets.TabletsEnumerator.MoveNext 方法

将枚举数索引移到集合中的下一对象。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public Function MoveNext As Boolean
用法
Dim instance As Tablets..::.TabletsEnumerator
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。

实现

IEnumerator.MoveNext()

备注

Tablets.TabletsEnumerator 支持循环访问 Tablets 集合,并实现 IEnumerator 接口。

此方法继承自 MoveNext

示例

此示例使用 Tablets 集合的 IEnumerator 来循环访问 Tablets 集合 allTablets,并在 ListBox 对象 listBoxTablets 中填入附加在系统上的每个 Tablet 设备的名称。

' Calling the constructor automatically fills the 
' Tablets collection with the available Tablet objects.
Dim allTablets As Tablets = New Tablets()

' clear the list box
Me.listBoxTablets.Items.Clear()

' populate the list box with the name of each tablet
' version using GetEnumerator()
Dim theTabletsEnumerator As IEnumerator = allTablets.GetEnumerator()
While (theTabletsEnumerator.MoveNext())
    Dim T As Tablet = theTabletsEnumerator.Current
    Me.listBoxTablets.Items.Add(T.Name)
End While
// Calling the constructor automatically fills the 
// Tablets collection with the available Tablet objects.
Tablets allTablets = new Tablets();

// clear the list box
this.listBoxTablets.Items.Clear();

// populate the list box with the name of each tablet
// version using GetEnumerator()
IEnumerator theTabletsEnumerator = allTablets.GetEnumerator();
while (theTabletsEnumerator.MoveNext())
{
    Tablet T = (Tablet)theTabletsEnumerator.Current;
    this.listBoxTablets.Items.Add(T.Name);
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Tablets.TabletsEnumerator 类

Tablets.TabletsEnumerator 成员

Microsoft.Ink 命名空间

Tablets