Entries in .NET (1)

Saturday
Jan172009

Comparing Strings in C#

Here's something that I never really gave much thought. In C#, there are multiple ways to compare two strings. But these different methods don't all yield the same result, particularly when a null value is involved. So I decided to write a few tests to see how the various methods differ.

Some of the info here should be common knowledge, but I think it's worth the time to take note of these different comparison methods.

Click to read more ...