Steven Giesel 10/27/2025

LinkedIn: "Are you still using new Random() everywhere?"

Read Original

This article debunks a viral LinkedIn claim that 'new Random() is evil' because it generates identical numbers in a loop. It explains the historical .NET Framework behavior based on system clock seeds and contrasts it with modern .NET's use of the Xoshiro256** algorithm via OS-level entropy. The post also examines the thread-safe `Random.Shared` property and its underlying `ThreadSafeRandom` implementation, providing a technical correction to common misconceptions.

LinkedIn: "Are you still using new Random() everywhere?"

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes