From cd5ce15b5772c0df55328b7dd92a8e37b39a04d1 Mon Sep 17 00:00:00 2001 From: Masterjun3 Date: Sat, 9 Nov 2024 23:25:13 +0100 Subject: [PATCH] use default constructor for better randomness (avoid using only 1000 seeds) --- TASVideos.Common/Extensions/EnumerableExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TASVideos.Common/Extensions/EnumerableExtensions.cs b/TASVideos.Common/Extensions/EnumerableExtensions.cs index e064d1fff..da7b2198d 100644 --- a/TASVideos.Common/Extensions/EnumerableExtensions.cs +++ b/TASVideos.Common/Extensions/EnumerableExtensions.cs @@ -31,7 +31,7 @@ public static IEnumerable SecondHalf(this IEnumerable source) /// public static T AtRandom(this ICollection collection) { - var randomIndex = new Random(DateTime.UtcNow.Millisecond).Next(0, collection.Count); + var randomIndex = new Random().Next(0, collection.Count); return collection.ElementAt(randomIndex); }