What is wrong with ToLowerInvariant()?
Posted
by JL
on Stack Overflow
See other posts from Stack Overflow
or by JL
Published on 2010-05-10T09:15:56Z
Indexed on
2010/05/10
9:44 UTC
Read the original article
Hit count: 773
I have the following line of code:
var connectionString = configItems.Find(item => item.Name.ToLowerInvariant() == "connectionstring");
VS 2010 Code analysis is telling me the following:
Warning 7 CA1308 : Microsoft.Globalization : In method ... replace the call to 'string.ToLowerInvariant()' with String.ToUpperInvariant().
Does this mean ToUpperInvariant() is more reliable?
© Stack Overflow or respective owner