如何匹配用户在文本框中写入的文本,然后逐个匹配一个字符验证文字 [英] How to match a text written in textbox by user then match a char one by one verify acording text

查看:79
本文介绍了如何匹配用户在文本框中写入的文本,然后逐个匹配一个字符验证文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在下面的文本框文本中逐个匹配单词的代码,





如何匹配书面文字在用户的文本框中然后逐个匹配一个字符验证文字

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

推荐答案

你可以直接比较两个字符串;)

You can compare the two strings directly ;)
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
}


这篇关于如何匹配用户在文本框中写入的文本,然后逐个匹配一个字符验证文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆