
C# tip How to String compare
Here is a quick C# tip, when using string compare don’t use var str = “Hello”; if(str.ToLower() === “hello”) use the Equals and StringComparison.InvariantCultureIgnoreCase enum. var str = “Hello”; if(str.Equals(“hello”, StringComparison.InvariantCultureIgnoreCase)) The thing you need to note is which rules…
