Ignoring the case-sensitiveness while comparing two strings in C#.

Posted by Vishalneeraj-24503 under Visual Studio category on | Points: 40 | Views : 524
Below is the best way to compare the string in C# and ignore the case-sensitivity.
string str_to_compare = "vishalNEERAJ";

//code goes here.

Note:-StringComparison.InvariantCultureIgnoreCase will ignore the case-sensitivity.

Comments or Responses

Login to post response