Closed this issue 8 months ago · 1 comments
https://henriquesd.medium.com/net-8-new-randomness-methods-f2422f55320f
.NET 8 在 Random 类中提供了一些新的方法,比如
Random
当我们在一个集合中随机选择一定数量时候,可以使用 GetItems, 比如 Random.Shard.GetItems
GetItems
Random.Shard.GetItems
如果对一个集合进行混洗,可以使用 Shuffle, 比如 Random.Shard.Shuffle
Shuffle
Random.Shard.Shuffle