Random rand = new Random(Guid.NewGuid().GetHashCode());
List<int> listLinq = new List<int>(Enumerable.Range(0, dt.Rows.Count - 1));
listLinq = listLinq.OrderBy(num => rand.Next()).ToList<int>();
參考:
https://dotblogs.com.tw/flweblab/2017/11/21/104209