Поделиться через


Tablets.TabletsEnumerator.MoveNext - метод

Обновлен: Ноябрь 2007

Moves the enumerator index to the next object in the collection.

Пространство имен:  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
Set to true if the index position references an object; false if the index position references the end of the collection.

Реализации

IEnumerator.MoveNext()

Заметки

The Tablets.TabletsEnumerator supports iterating over a Tablets collection and implements the IEnumerator interface.

This method inherits from MoveNext.

Примеры

This example uses the IEnumerator for the Tablets collection to iterate over the Tablets collection, allTablets, and populate the ListBox object listBoxTablets with the names of each tablet device that is attached to the system.

' 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