title: c# loop comparisons
body: <p>I use comboboxes a lot. I often loop through them to find a match based upon the SelectedValue, for example...<br></p>
  
  <pre><code>while(cmbCompany.SelectedValue.ToString()!=B1ID)
  { 
      cmbCompany.SelectedIndex++; 
  }
  </code></pre>
  
  <p>a) am I missing some much quicker option!<br>
  b) if my comparison was against an integer, is there any benefit in declaring a string and setting that equal to the integer.ToString(), or if I just (in my example above) used B1ID.ToString() would the compiler optimise it for me?<br>
  c) or are string comparisons so slow that I'd be better off parsing (or casting) the SelectedValue to an integer?</p>