RandomListExtensions.

Choose<T>(Random, T[]) Method

Summary

Chooses a random item.

Syntax

public static T Choose<T>(this Random random, params T[] collection)

Type Parameters

Name Description
T

Parameters

Name Type Description
random Random An instance of Random.
collection T[] Collection to choose item from.

Return Value

Type Description
T A random item from collection