Probably BAD coding style ... please comment
<p>I am checking whether the new name already exists or not.</p>

<p>Code 1</p>

<pre><code>if(cmbxExistingGroups.Properties.Items.Cast&lt;string&gt;().ToList().Exists(txt =&gt; txt==txtNewGroup.Text.Trim())) {
        MessageBox.Show("already exists.", "Add new group");
      }
</code></pre>

<p>Otherwise I could have written:</p>

<p>Code 2</p>

<pre><code>foreach(var str in cmbxExistingGroups.Properties.Items)
      {
        if(str==txtNewGroup.Text) {
     MessageBox.Show("already exists.", "Add new group");  
            break;
        }   
      }
</code></pre>

<p>I wrote these two and thought I was exploiting language features in code 1.</p>

<p>...and yes: both of them work for me ... I am wondering about the performance :-/</p>
