ja7*_*a72 2 c# sorting random shuffle
我想出的是:
RandomSort()
{
string[] list = { "Alpha", "Beta", "Gamma", ... }
Random rnd = new Random();
string[] list2 = list.OrderBy((x) => rnd.NextDouble()).ToArray();
}
Run Code Online (Sandbox Code Playgroud)
有没有其他方式,也许使用一个Dictionary或什么?谢谢.
| 归档时间: |
|
| 查看次数: |
266 次 |
| 最近记录: |