diff --git a/Core/Utils/RandomUtil.cs b/Core/Utils/RandomUtil.cs index 2549c1b1..9b6d0294 100644 --- a/Core/Utils/RandomUtil.cs +++ b/Core/Utils/RandomUtil.cs @@ -440,4 +440,10 @@ public List Shuffle(List originalList) ? parts[1].Length : 0; } + + public T GetArrayValue(IEnumerable list) + { + var rand = new Random(); + return list.ElementAt(rand.Next(0, list.Count())); + } }