HashSet<T>.Enumerator.IEnumerator.Current Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets the element at the current position of the enumerator.

Namespace:  System.Collections.Generic
Assembly:  System.Core (in System.Core.dll)

Syntax

'Declaration
Private ReadOnly Property Current As Object
    Implements IEnumerator.Current
Object IEnumerator.Current { get; }

Property Value

Type: System.Object
The element in the collection at the current position of the enumerator, as an Object.

Implements

IEnumerator.Current

Exceptions

Exception Condition
InvalidOperationException

The enumerator is positioned before the first element of the collection or after the last element.

Remarks

This member is an explicit interface member implementation. It can be used only when the HashSet<T> is cast to an IEnumerator interface.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.