Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am comparing two strings coming from DB.One string is CONTACT SPECIALIST and one string is Contact Specialist.But when i convert to tolower() it is changing every letter to lower case.So is there any to compare with "Contact Specialist".
Posted

You could have easily guessed what to do if you tried to thing a bit. Call string.ToLower() on both strings and compare the results.
—SA
 
Share this answer
 
Comments
Manfred Rudolf Bihy 21-Aug-14 0:49am    
So it is!
Use either the string comparison constant to ignore case or as an alternative you can compare both strings converted to lower/upper case.

Cheers!
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Aug-14 1:07am    
5ed.
—SA
I have converted left hand side value to capitals and compared. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900