Are there any globalization issues using ‘==‘ operator and string.Equals() method for comparing a string? If yes what is the solution to avoid this?
Are there any globalization issues using ‘ == ‘ operator and string.Equals() method for
Share
With
String.Equals, you can useStringComparison.InvariantCultureIgnoreCaseorStringComparison.InvariantCulture, With==you can’t do that.You should see: The Turkish İ Problem and Why You Should Care
Code Snippet from the same article:
The above will return a
falsefor the equal comparison using==operatorYou may try the following line in the code above
and the result will be
true