Skip to content

Commit

Permalink
use default constructor for better randomness (avoid using only 1000 …
Browse files Browse the repository at this point in the history
…seeds)
  • Loading branch information
Masterjun3 committed Nov 9, 2024
1 parent 3431191 commit cd5ce15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TASVideos.Common/Extensions/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static IEnumerable<T> SecondHalf<T>(this IEnumerable<T> source)
/// </summary>
public static T AtRandom<T>(this ICollection<T> collection)
{
var randomIndex = new Random(DateTime.UtcNow.Millisecond).Next(0, collection.Count);
var randomIndex = new Random().Next(0, collection.Count);
return collection.ElementAt(randomIndex);
}

Expand Down

0 comments on commit cd5ce15

Please sign in to comment.