مشاركة عبر


IIterator<T>.Current Property

Definition

Gets the current item in the collection.

public:
 property T Current { T get(); };
T Current();
public T Current { get; }
Public ReadOnly Property Current As T

Property Value

T

The current item in the collection.

Remarks

It is an error to access this property if the iterator has no current item.

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