Inventory Engine v4.2
Loading...
Searching...
No Matches
MoreMountains.Tools.ListExtensions Class Reference

List extensions. More...

Static Public Member Functions

static T MMRandom< T > (this IList< T > list)
 Returns a random element from the list.
static void MMSwap< T > (this IList< T > list, int i, int j)
 Swaps two items in a list.
static void MMShuffle< T > (this IList< T > list)
 Shuffles a list randomly.

Detailed Description

List extensions.

Member Function Documentation

◆ MMRandom< T >()

T MoreMountains.Tools.ListExtensions.MMRandom< T > ( this IList< T > list)
static

Returns a random element from the list.

Parameters
list
Template Parameters
T
Returns

◆ MMShuffle< T >()

void MoreMountains.Tools.ListExtensions.MMShuffle< T > ( this IList< T > list)
static

Shuffles a list randomly.

Template Parameters
T
Parameters
list

◆ MMSwap< T >()

void MoreMountains.Tools.ListExtensions.MMSwap< T > ( this IList< T > list,
int i,
int j )
static

Swaps two items in a list.

Template Parameters
T
Parameters
list
i
j

The documentation for this class was generated from the following file: