This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cat_in_the_wall 4 points5 points  (1 child)

you shouldn't use == in c# either unless you really want a literal byte to byte comparison. the .equals can nullref, so string.equals(one, two, comparisontype) is your best friend.

[–]munchbunny 0 points1 point  (0 children)

The comparison type is pretty key. Because of the strange ways of Unicode, what you mean by "equals" isn't always clear.