Which keywords can do case insensitive string comparison in c#?

String.Equals("string number 1", "String NUMBER 1", StringComparison.CurrentCultureIgnoreCase)

There is also a similar override of String.Compare().

Questions by musclebai   answers by musclebai

Showing Answers 1 - 6 of 6 Answers

Charlito

  • Apr 3rd, 2008
 

string stringA = "This is a Test";
string stringB = "THIS IS A TEST";
bool sameString = stringA.Equals( stringB, StringComparison.OriginalIgnoreCase );

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions