Utility GetNextListValue T  Method CleanCode C# Libraries v1.2.03 API
Gets the next value in a list.

Namespace: CleanCode.Data
Assembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax

public static T GetNextListValue<T>(
	T[] valueList,
	T currentValue
)

Parameters

valueList
Type:  T 
The value list.
currentValue
Type: T
The current value.
Type Parameters

T
The type of the values in the list.

Return Value

Next value in list (or first one if current value not present).
Exceptions

Remarks

The list ordering is not significant; the next value is determined by locating the current value, which you pass in. If your current value is the last item on the list, it wraps around to the beginning, returning the first value. If the currentValue is not found, it just returns the first item in the list.
See Also