将图像名称与文本框中的文本进行比较 [英] compare an image name with text in textbox
本文介绍了将图像名称与文本框中的文本进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道,如何将图片名称与文本框中的文字进行比较?我在图片框中绘制了一些名为test的图像,如果我写入文本框test,它会比较它并做一些事情......谢谢答案。 :)
Hi, I would like to know, how to compare an image name with text in textbox? I paint some image named "test" for example in picturebox and if I write to textbox "test" it compared it and do something... Thx for answer. :)
推荐答案
将字符串与TextBox
的内容进行比较只是
Comparing a string to the contents of aTextBox
is just
if (textbox.Text == "test")
{
// true
}
else
{
// not true
}
这篇关于将图像名称与文本框中的文本进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文