c#不重复的排序方法
public int getRandom(int num) { Thread.Sleep(5); // Random ro = new Random(unchecked((int)DateTime.Now.Ticks)); Random ro = new Random(System.Guid.NewGuid().GetHashCode()); int iResult; int iUp = num+1; int iDown = 1; iResult = ro.Next(iDown, iUp); return iResult; } public int getRandom(int down,int num) { Thread.Sleep(5); //Random ro = new Random(unchecked((int)DateTime.Now.Ticks)); Random ro = new Random(System.Guid.NewGuid().GetHashCode()); int iResult; int iUp = num + 1; int iDown = down; iResult = ro.Next(iDown, iUp); return iResult; }