Delen via


IIterator<T>.HasCurrent Property

Definition

Gets a value that indicates whether the iterator refers to a current item or is at the end of the collection.

public:
 property bool HasCurrent { bool get(); };
bool HasCurrent();
public bool HasCurrent { get; }
Public ReadOnly Property HasCurrent As Boolean

Property Value

Boolean

bool

True if the iterator refers to a valid item in the collection; otherwise, false.

Remarks

If the underlying collection has changed, the iterator may throw an exception.

.NET Framework If the underlying collection has changed, the iterator may throw a COMException exception with an HResult of 0x8000000C (E_CHANGED_STATE).

C++/WinRT If the underlying collection has changed, the iterator may throw a hresult_changed_state exception.

C++/CX If the underlying collection has changed, the iterator may throw a ChangedStateException exception.

Applies to

See also