TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Ignore the case while comparing two strings in C#
Thamilselvan Jagadeesan
Jun 26, 2013
63.2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
This blog will describe how to ignore the case while comparing two strings in c#
Below is the best way to compare the string in C# and ignore the case sensitive.
string strCompare = "testcomPARE";
if (strCompare.Equals("testcompare", StringComparison.InvariantCultureIgnoreCase))
{
///
}
Next Recommended Reading
How to extract a string lies between two strings in C#.Net?