Remove similar characters from list
<p>I am making a app to generate a password</p>

<p>Now I have a character list which use the following characters when all options for generate a password are null: </p>

<pre><code>  chars = "$%#@!*abcdefghijklmnopqrstuvwxyz1234567890?;:ABCDEFGHIJKLMNOPQRSTUVWXYZ^&amp;".ToCharArray();
</code></pre>

<p>Next I have a else with some options like Punctuation and Symbols, so then he is not using the standard characters:</p>

<pre><code>var listOfCharacters = string.Empty;

foreach (var currentOption in options)
{
    switch (currentOption)
    {

        case GenOptions.Punctuation:
             listOfCharacters += "&amp;@.#%!*?;:,";
             break;
        case GenOptions.Symbols:
             listOfCharacters += "^$";
             break;       
        default:
             break; 
    }
}

chars = listOfCharacters.ToCharArray();

listOfCharacters.Remove('i'); listOfCharacters.Remove('!');  
listOfCharacters.Remove('l'); listOfCharacters.Remove('1'); 
listOfCharacters.Remove('O'); listOfCharacters.Remove('o'); 
listOfCharacters.Remove('0'); listOfCharacters.Remove('q');
listOfCharacters.Remove('p'); listOfCharacters.Remove('g');    
listOfCharacters.Remove('I');
</code></pre>

<p>Now I want to build in a option to remove Similar characters so characters who are almost a copy from each other like o and 0. I have want to do this with listofcharacter.remove but when I use it like above it gives me a error because its null/empty. Now how can I fix this?</p>
