Gets the next value in a list.
Namespace: CleanCode.DataAssembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
public static T GetNextListValue<T>(
T[] valueList,
T currentValue
)
public static T GetNextListValue<T>(
T[] valueList,
T currentValue
)
Public Shared Function GetNextListValue(Of T) ( _
valueList As T(), _
currentValue As T _
) As T
Public Shared Function GetNextListValue(Of T) ( _
valueList As T(), _
currentValue As T _
) As T
public:
generic<typename T>
static T GetNextListValue(
array<T>^ valueList,
T currentValue
)
public:
generic<typename T>
static T GetNextListValue(
array<T>^ valueList,
T currentValue
)
Parameters
- valueList
- Type: T
The value list.
- currentValue
- Type: T
The current value.
- T
- The type of the values in the list.
Return Value
Next value in list (or first one if current value
not present).
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.