using System.Collections.Generic; using System; namespace YBEE.EQM.Core; /// /// 工具类型 /// public static class Utils { /// /// List随机乱序 /// /// /// public static void ListRandom(List sources) { Random rd = new(); int index; T temp; for (int i = 0; i < sources.Count; i++) { index = rd.Next(0, sources.Count - 1); if (index != i) { temp = sources[i]; sources[i] = sources[index]; sources[index] = temp; } } } }