| ListExtensionsSwapT Method |
Swaps two elements in the specified list.
Namespace:
Ookii.Jumbo
Assembly:
Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax public static void Swap<T>(
this IList<T> list,
int index1,
int index2
)
<ExtensionAttribute>
Public Shared Sub Swap(Of T) (
list As IList(Of T),
index1 As Integer,
index2 As Integer
)
public:
[ExtensionAttribute]
generic<typename T>
static void Swap(
IList<T>^ list,
int index1,
int index2
)
[<ExtensionAttribute>]
static member Swap :
list : IList<'T> *
index1 : int *
index2 : int -> unit
Parameters
- list
- Type: System.Collections.GenericIListT
The list. - index1
- Type: SystemInt32
The first index. - index2
- Type: SystemInt32
The second index.
Type Parameters
- T
- The type of the elements
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also