Table of Contents

Class EmptyEnumerator<T>

Namespace
Garyon.Objects.Enumerators
Assembly
Garyon.dll

Denotes an empty enumerator. During its enumeration, no values are yielded.

public class EmptyEnumerator<T> : IEnumerator<T>, IEnumerator, IDisposable

Type Parameters

T

The type of values that are being (not) enumerated.

Inheritance
EmptyEnumerator<T>
Implements
Inherited Members
Extension Methods

Remarks

Consider using the [] expression for empty enumerables.

Properties

Current

Always throws an exception, as this enumerator should not yield any values.

public T Current { get; }

Property Value

T

Instance

Gets the single instance of the empty enumerator for the given type.

public static EmptyEnumerator<T> Instance { get; }

Property Value

EmptyEnumerator<T>

Methods

MoveNext()

Always returns false, as no value is being enumerated.

public bool MoveNext()

Returns

bool

false.