An efficient thread-safe randomizer that can optionally be used as a source generator.
License
MIT
Deps
1
Install Size
—
Vulns
✓ 0
Published
Dec 9, 2025
$ dotnet add package ThreadSafeRandomizer
An efficient thread-safe randomizer.
The recommended means is to use NuGet, but you could also download the source code from here.
Replace:
var random = new Random(); var myNum = random.Next();
With:
var myNum = ThreadSafeRandom.Instance.Next();
18.9K