Check a list<string> for matches to a userdefined string
<p>I am having difficulties finding a suiteble way as to search a <code>List&lt;&gt;</code> of strings i have for matches to a user specified string, I am not even sure i am going about it in the best way but what i got so far is:</p>

<pre><code>   // This is the input string.
        string input = userDefinedStr.ToLower(); //New variable and made into lower cases.           

        for (int i = 0; i &lt; listBox1.Items.Count; i++)
        {
            if (listBox1.Items[i].ToString().IndexOf(input, stringComparison.OrdinalIgnoreCase) &gt;= 0)
            {
                listBox1.SetSelected(i, true);
            }
            else
            {
                MessageBox.Show("Sorry, There was no matches found.", "An oupps happend!");                    
            }

        }
</code></pre>

<p>The problem is that there can be more the one string in the <code>List</code> that contains the userdefined string and i guess that the best way is actually to display all the <code>List&lt;string&gt;</code> matches in the <code>listBox1</code> instead of just marking the first one found. </p>

<p>Or can it be done in another more effective way?!? </p>

<p>I am new to C# and coding in general so i dont feel like i know the best way, i have read so many articles and postings but i cant find the one pointing me in the right direction on this.</p>
