TabletsEnumerator.Current Property

TabletsEnumerator.Current Property

Gets the Tablet object in the Tablets collection to which the enumerator is pointing.

Definition

Visual Basic .NET Public ReadOnly Property Current As Tablet
C# public Tablet Current { get; }
Managed C++ public: __property Tablet* get_Current();

Property Value

Microsoft.Ink.Tablet. The Tablet object in the Tablets collection to which the enumerator is pointing.

This property is read-only. This property has no default value.

Remarks

After a TabletsEnumerator enumerator is created, or after the Reset method is called, the MoveNext method must be called to advance the enumerator to the first element of the collection before reading the value of the Current property; otherwise, the Current property is undefined.

The Current property throws an exception if the last call to the MoveNext method returns false. If the last call to the MoveNext method returns false, the enumerator has reached the end of the Tablets collection.

The Current property does not move the position of the enumerator. Consecutive calls to the Current property return the same object until either the MoveNext or Reset method is called.

An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection—such as adding, modifying or deleting elements—the enumerator is irrecoverably invalidated. The next call to the MoveNext or Reset method throws an InvalidOperationException Leave Site exception. If the collection is modified between calling the MoveNext method and calling the Current property, the Current property returns the element that it is set to, even if the enumerator is already invalidated.

See Also