如何删除最后的章程? [英] How to remove last charter?
本文介绍了如何删除最后的章程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
如何通过单击Button1从Textbox1删除最后一个章程?
假设我有一个text =Google的文本框
当我点击Button1然后删除最后一个包机时它将=Googl
再次点击=Goog
我希望每个人都清楚我真正想要的东西。
感谢先进的
解决方案
尝试:
TextBox1.Text = TextBox1.Text.Substring( 0 ,TextBox1.Text.Length - 1 );
试试这个:
Textbox1.Text = Textbox1.Text.Remove(Textbox1.Text.Length - 1 );
Hello,
How to remove last charter from Textbox1 by clicking Button1 ?
Suppose I have a textbox with text = "Google"
when I will click Button1 then delete last charter and it will = "Googl"
again click ="Goog"
I hope everyone clear what I really wanted .
thanks in advanced
解决方案
Try:
TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.Text.Length - 1);
Try this:
Textbox1.Text = Textbox1.Text.Remove(Textbox1.Text.Length - 1);
这篇关于如何删除最后的章程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文