There are a number of ways to compare strings. Are there performance gains by doing one way over another?
I\'ve always opted to compare strings like so:
Here is the most complete and helpful MSDN guide for string comparison I have found.
Use comparisons with StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase for better performance.