Moves an item in a generic list forward or backward.
Namespace: InitPrtFastAssembly: InitPrtFast (in InitPrtFast.dll) Versione: 28.1.0-RC
Sintassipublic static bool MoveItem<T>(
List<T> list,
int idx,
bool moveForward
)
Public Shared Function MoveItem(Of T) (
list As List(Of T),
idx As Integer,
moveForward As Boolean
) As Boolean
public:
generic<typename T>
static bool MoveItem(
List<T>^ list,
int idx,
bool moveForward
)
static member MoveItem :
list : List<'T> *
idx : int *
moveForward : bool -> bool Parametri
- list ListT
- The list to modify.
- idx Int32
- The index of the item to move.
- moveForward Boolean
- True to move the item forward (to next position), false to move backward (to previous position).
Parametri di tipo
- T
- The type of elements in the list.
Valore di ritorno
BooleanTrue if the move was successful, false if the index is out of range or the item cannot be moved in the specified direction.
Vedi anche