String Comparisons
In Java you were not allowed to compare strings using the == operator (the == operator would do a reference comparison). So you had to use the Equals() method instead. For example...
if (userName.Equals(”Willem”)) { ... }
Instead of...
if (userName == “Willem“) {...}
That stuck with me. Now, in C#, I always compare strings using the Equals() method. However, according to this acticle, System.String overloads the == operator and calls Equals() internally. Good to have that one cleared up.
On the rare occasion that you really do want to do a reference comparison, I guess you would have to use Object.ReferenceEquals.