Show / Hide Table of Contents

Interface IEnumerator<TSelf, T>

Represents ad-hoc enumerator implemented as value type to avoid enumerator allocation and prevent the compiler to generate Dispose() call.

Inherited Members
IResettable.Reset()
Namespace: DotNext.Collections.Generic
Assembly: DotNext.dll
Syntax
public interface IEnumerator<TSelf, out T> : IResettable where TSelf : struct, IEnumerator<TSelf, out T> where T : allows ref struct
Type Parameters
Name Description
TSelf

The value type that implements an enumerator.

T

The type of objects to enumerate.

Remarks

The enumerator doesn't implement IEnumerator<T> interface implicitly but can be converted to it by using regular type cast.

Properties

View Source

Current

Declaration
T Current { get; }
Property Value
Type Description
T

Methods

View Source

MoveNext()

Declaration
bool MoveNext()
Returns
Type Description
bool

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾