Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
I want to code of Matching word one by one char of textbox text below,,


How to match a text written in textbox by user then match a char one by one verify acording text
Posted
Comments
Vamsi Krishnna 4-Feb-14 3:20am    
Sorry, Not clear with your question. Are you referring to compare two strings by each character??
If yes, you can do it with compare field validator.
Karthik_Mahalingam 4-Feb-14 12:57pm    
provide more info..
post some code..

1 solution

You can compare the two strings directly ;)
C#
if ((string.Compare(strOriginal, strModified, false)) < 0)
{
        //strOriginal is less than strModified
}
else if ((string.Compare(strOriginal, strModified, false)) > 0)
{
        //strOriginal is more than strModified
}
else if ((string.Compare(strOriginal, strModified, false)) == 0)
{
        //Both strings are equal
}
 
Share this answer
 
v2

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