AlgorithmsRotateInPlaceT Method |
Rotates a list or array in place.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static void RotateInPlace<T>(
IList<T> list,
int amountToRotate
)
public:
generic<typename T>
static void RotateInPlace(
IList<T>^ list,
int amountToRotate
)
Parameters
- list
- Type: System.Collections.GenericIListT
The list or array to rotate. - amountToRotate
- Type: SystemInt32
The number of elements to rotate. This value can be positive or negative.
For example, rotating by positive 3 means that list[3] is the first item in the resulting list.
Rotating by negative 3 means that list[list.Count - 3] is the first item in the resulting list.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.RotateInPlace``1(System.Collections.Generic.IList{``0},System.Int32)"]
Exceptions
RemarksAlthough arrays cast to IList<T> are normally read-only, this method
will work correctly and modify an array passed as list.
See Also