C#生成流水码:从0到9中随机生成8位数字,同批次的流水码不重复。该怎么解决

C#生成流水码:从0到9中随机生成8位数字,同批次的流水码不重复。
每次随机8位的数字,具体生成多少个,由输入数量决定。忘各位大侠教教小弟,C#怎么实现。
特别注明:要求每次生成的流水码必须是不一致的!!!

下面这段代码的这种调用系统时间作为随机种子的做法,虽然可以生成随机数,但是会有少部分重复数据,我要的是每批生成的数据100%无重复。。。。望各位大虾和大侠多多指教,有话就说,谢谢~

附:(会有少部分重复,不可取)
 
  private static char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };

  public static string GenerateRandomNumber(int Length)
  {
  System.Text.StringBuilder newRandom = new System.Text.StringBuilder(10);
  Random rd = new Random();
  for (int i = 0; i < Length; i++)
  {
  newRandom.Append(constant[rd.Next(10)]);
  }
  return newRandom.ToString();
  }



------解决方案--------------------
guid.newguid
Random rand = new Random(Guid.NewGuid().GetHashCode()); 

------解决方案--------------------
探讨
guid.newguid
Random rand = new Random(Guid.NewGuid().GetHashCode());

------解决方案--------------------
List history = new List();

Random rd = new Random();
int num = rd.Next(100000000); 数字直接生成就可以,0-9,刚好是10进制8位还在int32范围之内
while (history.Contains(num)) num = rd.Next(100000000); //重复就再来一次
history.Add(num);
------解决方案--------------------
一个GUID解决所有问题!!!!
------解决方案--------------------
C# code

Random b = new Random();
            int length =10;
            int rand=b.Next(100000000);
            int[] No = new int[length];//
            bool[] a = new bool[100000000];
            for (int i = 0; i < length; i++)
            {                
                if (!a[rand])
                {
                    No[i] = rand;                   
                }
                else
                {
                    i--;
                }
                rand = b.Next(100000000);
            }

------解决方案--------------------
探讨
引用:
guid.newguid
Random rand = new Random(Guid.NewGuid().GetHashCode());


楼上的果然是牛叉,我现在看明白了,但是万一你的这个随机种子Guid.NewGuid().GetHashCode()重复了,咋办呢?

------解决方案--------------------
探讨
引用:
引用:
引用:
guid.newguid
Random rand = new Random(Guid.NewGuid().GetHashCode());


楼上的果然是牛叉,我现在看明白了,但是万一你的这个随机种子Guid.NewGuid().GetHashCode……

------解决方案--------------------
楼主不用太钻牛角尖,概率小到一定程度就可以忽略了
------解决方案--------------------
guid replace("-","").substring
rd.Next(100000000,999999999);
------解决方案--------------------
C# code

            Random b = new Random();
            int length =10;
            int rand=b.Next(100000000);
            int[] No = new int[length];//
            bool[] a = new bool[100000000];
            for (int i = 0; i < length; i++)
            {                
                if (!a[rand])
                {
                    No[i] = rand; 
                    a[rand]=true; //漏了!                 
                }
                else
                {
                    i--;
                }
                rand = b.Next(100000000);
            }

------解决方案--------------------