标签:
1 var rd = new Random(); 2 List<int> list = new List<int>(); 3 var num = 0; 4 while (list.Count<100) 5 { 6 num = rd.Next(1, 101); 7 if (!list.Contains(num)) 8 { 9 list.Add(num); 10 } 11 }
标签:
原文地址:http://www.cnblogs.com/xiaoafei1991/p/4470074.html