Compartir a través de


Tablets.TabletsEnumerator.MoveNext (Método)

Actualización: noviembre 2007

Desplaza el índice del enumerador al siguiente objeto de la colección.

Espacio de nombres:  Microsoft.Ink
Ensamblado:  Microsoft.Ink (en Microsoft.Ink.dll)

Sintaxis

'Declaración
Public Function MoveNext As Boolean
'Uso
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

Valor devuelto

Tipo: System.Boolean
Se establece en true si la posición de índice hace referencia a un objeto; se establece en false si la posición de índice hace referencia al final de la colección.

Implementaciones

IEnumerator.MoveNext()

Comentarios

El objeto Tablets.TabletsEnumerator admite la iteración en una colección Tablets e implementa la interfaz IEnumerator.

Este método hereda de MoveNext.

Ejemplos

En este ejemplo se usa la interfaz IEnumerator de la colección Tablets para recorrer en iteración la colección Tablets, allTablets, y rellenar el objeto ListBoxlistBoxTablets con los nombres de cada dispositivo Tablet PC conectado al sistema.

' 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);
}

Plataformas

Windows Vista

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Información de versión

.NET Framework

Compatible con: 3.0

Vea también

Referencia

Tablets.TabletsEnumerator (Clase)

Tablets.TabletsEnumerator (Miembros)

Microsoft.Ink (Espacio de nombres)

Tablets