title: What is difference between different string compare methods
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/44288/differences-in-string-compare-methods-in-c">Differences in string compare methods in C#</a>  </p>
  </blockquote>
  
  
  
  <p>In .NET there are many string comparison methods, I just want to confirm which one is the best to use considering performance.</p>
  
  <pre><code>string.Equals()
  
  string.Compare()
  
  string.CompareTo()
  
  string.CompareOrdinal()
  
  string.ReferenceEquals()
  
  if (str1 == str2)
  </code></pre>