How could I improve this C# randomising method?

前端 未结 7 2170
南方客
南方客 2021-02-10 20:30

I think I\'ve settled on this as the most simple and unit-testable method for randomising a list, but would be interested to hear of any improvements.

public sta         


        
7条回答
  •  日久生厌
    2021-02-10 20:56

    Be aware of the risks of naive shuffling algorithms, that look good, but do not stand up to testing!

    Check this excellent article for an example.

提交回复
热议问题