title: Random number generator in C# - unique values
body: <p>I'm busy in C# with coding an array. I can fill it up with random generators but now is my question how do i do this but so that i can check if the value is already in the array and if so generate an new value</p>
  
  <p>Extra info:<br>
  Max value : 100<br>
  Number of elements : 100  </p>
  
  <p><strong>IMPORTANT PLZ WORK FURTHER ON MY IDEA</strong></p>
  
  <p>my idea</p>
  
  <pre><code>public void FillArray(int[] A, int Range)
  {
      for (int I = 0; I &lt; A.Length; I++)
      {
          A[I] = ValidNumber(T, I, Range);
      }
  } /* Fill Array */
  </code></pre>
  
  <p>Implementation of selection sort</p>
  
  <pre><code>public void SelectionSort(int[] A)
  {
      int K, X;
      for (int I = 0; I &lt; A.Length - 1; I++)
      {
          K = I;
          X = A[K];
          for (int J = I + 1; J &lt; A.Length; J++)
          {
              if (A[J] &lt; X)
              {
                  K = J;
                  X = A[K];
              }
          }
          A[K] = A[I];
          A[I] = X;
      }
  } /* Selection sort */
  </code></pre>
  
  <p>These are just some ideas now i want to know how i can fix it so i can look with selection sort if there is allread there (fillarray) that is same if so replace it with a new random value. And so i want to create a random array with ints - from 1 to 100 in a random order</p>