Print Unique keys in C#.net
<p>I am trying to make a key generator that generates upper case, lower case and numeric keys.
My current code below generates duplicates keys, using random numbers. <br>
How could I update it to generate unique keys?<br></p>

<pre><code> public static void printLowerCaseKeys()
    {
        string array = "";
        int k = 0;
        if (sDelimeterOption == "yes")
        {
            while (k &lt; sKeyLength)
            {
                for (int i = 0; i &lt; sDelimeterCharPosition; i++)
                {
                    if (k &gt;= sKeyLength)
                        break;
                    array = array + (char)r.Next(97, 123);
                    k++;
                }
                if (k &lt; sKeyLength)
                {
                    array = array + sDelimeterChar;
                    k++;
                }
            }
        }
        else
        {
            while (k &lt; sKeyLength)
            {
                array = array + (char)r.Next(97, 123);
                k++;
            }
        }
        Console.WriteLine(array);
    }
</code></pre>
