Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default Random constructor #2034

Merged
merged 1 commit into from
Nov 10, 2024
Merged

Use default Random constructor #2034

merged 1 commit into from
Nov 10, 2024

Conversation

Masterjun3
Copy link
Collaborator

Previously, the use of DateTime.UtcNow.Millisecond for the seed means only 1000 different seeds were possible, which means if the collection is at around 200 items, chances are that it's impossible to get one of the items with the 1000 seeds.

The default constructor uses a good random seed value.

@adelikat adelikat merged commit 69be7fe into main Nov 10, 2024
1 check passed
@adelikat adelikat deleted the use-randomer-random branch November 10, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants