List<int> L=new List<int>(); Random random = new Random(); for (int i = 1; i <= 100; i++) { if (L.IndexOf(i) < 0) { L.Add(random.Next(1,100)); } } L.Reverse(); L.Sort(); //并支持排序