How to remove the last character from textbox in C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text.Remove(textBox1.Text.Length - 1);
        }
    }
}




/*
 * run:
 *
 * 
 */


 



answered Aug 8, 2023 by avibootz

Related questions

1 answer 160 views
1 answer 141 views
1 answer 112 views
1 answer 117 views
1 answer 158 views
1 answer 192 views
...