我如何删除"System.Windows.Forms.TextBox";从输出文本? [英] How do i remove "System.Windows.Forms.TextBox" from the output text?
本文介绍了我如何删除"System.Windows.Forms.TextBox";从输出文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
text2 = string.Format("[B](No Change)[/B]");
输出结果为:
System.Windows.Forms.TextBox,文本:(无更改)
如何从输出中删除"System.Windows.Forms.TextBox,文本:"? :3
谢谢.
The out put comes out as:
System.Windows.Forms.TextBox, Text: (No Change)
How can I remove the "System.Windows.Forms.TextBox, Text:" from my output? :3
Thanks.
推荐答案
text2的变量类型是什么?
是文本框吗?如果是,那么应该是
What is the variable type of text2 ?
Is it textbox? If yes, then it should be
text2.text = string.Format("[B](No Change)[/B]");
希望对您有帮助
Milind
Hope that helps
Milind
不,不是.
您显示的代码片段只会将变量text2
设置为字符串"[B](No Change)[/B]"
.
它在功能上与
相同
No, it doesn''t.
The code fragment you show will only ever set the variabletext2
to the string"[B](No Change)[/B]"
.
It is functionally identical to
text2 = "[B](No Change)[/B]";
错误出现在代码的其他部分.
我建议您在显示的行上放置一个断点,然后自己检查一下.
我们无法根据该信息为您提供帮助:这是错误的代码!
The error is in some other part of your code.
I suggest that you put a breakpoint on the line you show, and check it for yourself.
We can''t help you based on that info: it is the wrong code!
这篇关于我如何删除"System.Windows.Forms.TextBox";从输出文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文