code-analysis

There are 1 entries for the tag code-analysis

The Turkish İ Problem and Why You Should Care

Take a look at the following code. const string input = "interesting"; bool comparison = input.ToUpper() == "INTERESTING"; Console.WriteLine("These things are equal: " + comparison); Console.ReadLine(); Let’s imagine that input is actually user input or some value we get from an API. That’s going to print out These things are equal: True right? Right?! Well not if you live in Turkey. Or more accurately, not if the current culture of your operating system is tr-TR (which is likely if you live in Turkey). To prove...