dotnet / dotnet/dotnet-api-docs
Missing explanation
Open
area-System.DateTime
Pri3
untriaged
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
https://learn.microsoft.com/de-de/dotnet/api/system.random.-ctor?view=net-8.0#system-random-ctor(system-int32)
The example code uses:
`(int) DateTime.Now.Ticks & 0x0000FFFF`
There is no explanation why this is used. The example mentions the seeds generated might end up the same when executed too fast. Is this an example safety because Ticks changes from higher to lower bits?
Contributor guide
Assessment
This issue has not been assessed yet.