Daily Archives: Sunday, 12 July, 2009

Tip of the day #13 (String Equality)

When comparing two strings in a case insensitive manner, use: myFirstString.Equals(mySecondString, StringComparison.InvariantCultureIgnoreCase) or, if cultural rules are to be ignored completely* then use: myFirstString.Equals(mySecondString, StringComparison.OrdinalIgnoreCase) over: myFirstString.ToLower() == mySecondString.ToLower() * The invariant culture is actually a non-region specific English language … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

What were they thinking?

I just spotted the following advert on StackOverflow: I have to say that I really don’t know what they were thinking when they thought up that advert. I especially wouldn’t know how to interpret this advert if I was a … Continue reading

Posted in Uncategorized | 7 Comments