CollectionExtensionsSwapTValue Method

CVB.Net Documentation
Swap two elements of an array

Namespace:  Stemmer.Cvb.Collections.Generic
Assembly:  Stemmer.Cvb (in Stemmer.Cvb.dll) Version: 14.0.0.0
Syntax

public static void Swap<TValue>(
	this TValue[] arr,
	int index1,
	int index2
)

Parameters

arr
Type: TValue
the array to attach the extension method to
index1
Type: SystemInt32
element one to swap
index2
Type: SystemInt32
element two to swap

Type Parameters

TValue
type of the elements stored in the array

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . 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).
Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionIf index1 or index2 is either less than 0 or greater than the length of the array
See Also

Reference