title: random number in C#
body: <p>I want display a random 4 digit number without repeating ,And I want to answer with one round in while ring, in The following code once the first round is answer and once the sixth round is answer.
  i want, At least get around the rings to answer.</p>
  
  <pre><code>Random Number = new Random();
  int Num1, Num2, Num3, Num4;
  int Index = 0;
  do
  {
      Num1 = NUmber.Next(0, 10);
      Num2 = NUmber.Next(0, 10);
      Num3 = NUmber.Next(0, 10);
      Num4 = NUmber.Next(0, 10);
      Index++;  
  } 
  while (Num1==Num2||Num1==Num3||Num1==Num4||Num2==Num3||Num2==Num4||Num3==Num4);
  Console.WriteLine("{0}{1}{2}{3}",Num1,Num2,Num3,Num4);
  Console.WriteLine(Index);
  Console.ReadKey();
  </code></pre>