title: Performance of IndexOf(char) vs Contains(string) for checking the presence of a character in a string
body: <p>I want to know if </p>
  
  <pre><code>string.IndexOf(char) 
  </code></pre>
  
  <p>is <em>faster</em> than </p>
  
  <pre><code>string.Contains(string) 
  </code></pre>
  
  <p>Intention is to check if a <em>single character</em> is present in a <code>string</code>. I know that as per requirement I should use <code>string.Contains(string)</code> but that is not the point of this question. I did try to <em>disassemble</em> <code>mscorlib.dll</code> in an attempt to compare their implementations but I could not find the implementation of </p>
  
  <pre><code> string.IndexOf(char)
  </code></pre>
  
  <p>as it is implemented within the <em>CLR itself</em>. Implementation of </p>
  
  <pre><code> string.Contains(string)
  </code></pre>
  
  <p>looks quite <em>heavy</em> though.</p>