M_WolfCurses_EnumerableExtension_PickRandom__1_1 - Maxwolf/WolfCurses GitHub Wiki

EnumerableExtension.PickRandom(T) Method (IEnumerable(T), Int32)

Picks a random element from the list.

Namespace: WolfCurses
Assembly: WolfCurses (in WolfCurses.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public static IEnumerable<T> PickRandom<T>(
	this IEnumerable<T> source,
	int count
)

Parameters

 

source
Type: System.Collections.Generic.IEnumerable(T)
Source collection.
count
Type: System.Int32
Total number of elements in the collection.

Type Parameters

 

T
Type of list.

Return Value

Type: IEnumerable(T)
Shuffled list of elements[!:IEnumerable].

Usage Note

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

Version Information

Wolf Curses

Supported in: 0.1

See Also

Reference

EnumerableExtension Class
PickRandom Overload
WolfCurses Namespace

⚠️ **GitHub.com Fallback** ⚠️