Table of Contents

DayOfMonthSet.Enumerator Struct

Definition

Namespace
Bodu
Assembly
Bodu.Core.dll
Package
Bodu.Core 1.3.0
Source
DayOfMonthSet.Enumerator.cs

Enumerates the days a DayOfMonthSet selects, in ascending order, without allocating.

public struct DayOfMonthSet.Enumerator : IEnumerator<int>, IEnumerator, IDisposable
Implements
Inherited Members
Extension Methods

Remarks

Returned by GetEnumerator() and bound directly by foreach. The enumerator captures the set's bits when it is created; a DayOfMonthSet is immutable, so the snapshot is exact.

Properties

Current

Gets the day at the current position of the enumerator.

public readonly int Current { get; }

Property Value

int

The current day; undefined before the first call to MoveNext() and after it returns false.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public readonly void Dispose()

MoveNext()

Advances the enumerator to the next selected day.

public bool MoveNext()

Returns

bool

true when the enumerator moved to another day; false when every selected day has been returned.

Reset()

Returns the enumerator to its initial position, before the first selected day.

public void Reset()

Explicit Interface Implementations

IEnumerator.Current

Gets the element in the collection at the current position of the enumerator.

readonly object IEnumerator.Current { get; }

Returns

object

The element in the collection at the current position of the enumerator.

Applies to

ProductVersions
.NET8, 10