From 053aaaf17cf76636d3442e65baf26e56ca501c28 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 4 Mar 2021 22:53:39 +0100 Subject: [PATCH] removed the array-based GetRandomEntry method as it made lists have to be typecast --- MLEM/Extensions/RandomExtensions.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/MLEM/Extensions/RandomExtensions.cs b/MLEM/Extensions/RandomExtensions.cs index 783f7c2..ae553aa 100644 --- a/MLEM/Extensions/RandomExtensions.cs +++ b/MLEM/Extensions/RandomExtensions.cs @@ -15,11 +15,6 @@ namespace MLEM.Extensions { /// The entries to choose from /// The entries' type /// A random entry - public static T GetRandomEntry(this Random random, params T[] entries) { - return entries[random.Next(entries.Length)]; - } - - /// public static T GetRandomEntry(this Random random, IList entries) { return entries[random.Next(entries.Count)]; }