Start of main content
How random is Random? Pitfalls of Random in .NET 6
There are many pitfalls of the legacy .NET System.Random and RandomNumberGenerator, which experienced .NET developers are aware of. Microsoft has decided to quietly "fix" Random implementation in .NET 6, while at the same time trying to give Random some features of RandomNumberGenerator, and give RandomNumberGenerator some features of Random. We will review these .NET 6 changes, what problems Microsoft aims to solve, what problems they intentionally keep, and what new problems they introduce.