Random String Generator that does not repeat
<p>I've been using this random string generator. But my problem is that this random string generator is repeating itself. I've heard of using the shuffle method but I dont know how to implement it in my code. Any help will be mostly appreciated. </p>

<pre><code>private static Random random = new Random();
public static string RandomString(int length)
{
    const string chars = "0123456789";
    return new string(Enumerable.Repeat(chars, length)
      .Select(s =&gt; s[random.Next(s.Length)]).ToArray());
}

public static string RandomString2(int length)
{
    const string chars = "AB";
    return new string(Enumerable.Repeat(chars, length)
      .Select(s =&gt; s[random.Next(s.Length)]).ToArray());
}
</code></pre>

<p>And then in the page load i actually call my 2 methods and combine them in a textbox. </p>

<pre><code>string dummy = RandomString(1);
string dummy2 = RandomString2(1);
txtTagNumber.Text = dummy2.ToString() + dummy.ToString();
</code></pre>