生成不重复的随机数数组,算法优化
摘要:
privatevoidForm1_Load(objectsender,EventArgse){stringresult="";System.Diagnostics.Stopwatchwatch=newSystem.Diagnostics.Stopwatch();watch.Start();List<int>list=newList<int>();Randomrandom=newRandom();while(list.Count<100){intt=random.Next(0,100);if(!list.Contains(t)){list.Add 阅读全文
posted @ 2012-09-07 18:21 项羽 阅读(281) 评论(0) 推荐(0) 编辑