Table of Contents

Class CycleGenerator<T>

Namespace
SunamoCollectionsGeneric.Collections
Assembly
SunamoCollectionsGeneric.dll

Generator that cycles through a list of items, returning to the start after reaching the end

public class CycleGenerator<T>

Type Parameters

T

The type of elements in the cycle

Inheritance
CycleGenerator<T>
Inherited Members
Extension Methods

Constructors

CycleGenerator(List<T>)

Initializes a new instance with the specified items to cycle through

public CycleGenerator(List<T> items)

Parameters

items List<T>

The items to cycle through

Methods

TakeAnother()

Returns the next item in the cycle, wrapping to the beginning when reaching the end

public T TakeAnother()

Returns

T

The next item in the cycle