Skip to content

Instantly share code, notes, and snippets.

@xuanvu
Created April 24, 2012 20:37
Show Gist options
  • Save xuanvu/2483517 to your computer and use it in GitHub Desktop.
Save xuanvu/2483517 to your computer and use it in GitHub Desktop.
Comparison
public class Comparison
{
public void Compare()
{
StringBuilder sb1 = new StringBuilder("Markit on Demand");
StringBuilder sb2 = new StringBuilder("Markit on Demand");
var compare = sb1 == sb2;
var equals = sb1.Equals(sb2);
}
public void Compare2()
{
String s1 = "Markit on Demand";
String s2 = "Markit on Demand";
var compare = s1 == s2;
var equals = s1.Equals(s2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment