Is there an easy way to randomize a list in VB.NET?

后端 未结 8 1405
无人及你
无人及你 2020-12-02 00:35

I have a list of type System.IO.FileInfo, and I would like to randomize the list. I thought I remember seeing something like list.randomize() a li

8条回答
  •  [愿得一人]
    2020-12-02 01:24

    You could create custom comparer that just returns a random number, then sort the list using this comparer. It could be horribly inefficient and cause an almost infinite loop, but might be worth a try.

提交回复
热议问题