diff --git a/X10D/RandomExtensions.cs b/X10D/RandomExtensions.cs index 1f88da0..2503418 100644 --- a/X10D/RandomExtensions.cs +++ b/X10D/RandomExtensions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; + using System.Linq; #endregion @@ -28,7 +29,7 @@ /// The collection to draw from. /// Returns a random element of type from . public static T OneOf(this Random random, params T[] source) => - source[random.Next(source.Length)]; + source.ToList().OneOf(random); /// /// Returns a random element from using the instance.