More efficient way to get all indexes of a character in a string
<p>Instead of looping through each character to see if it's the one you want then adding the index your on to a list like so:</p>

<pre><code>     var foundIndexes = new List&lt;int&gt;();
     for (int i = 0; i &lt; myStr.Length; i++)
     {
        if (myStr[i] == 'a')
           foundIndexes.Add(i);
     }
</code></pre>
