How to increase the value of a number in a textbox?

-4

I have this code

 private void mas_Click(object sender, EventArgs e)
    {
        bpm++;
        bpm_textbox.Text = bpm.ToString();

    }

but I want to directly increase the string without having to convert from integer to string, since I can not click on the button several times and it increases rapidly

    
asked by Edgar Diaz 08.05.2018 в 21:09
source

1 answer

-1
private void mas_Click(object sender, EventArgs e)
{
    Int32.Parse(bpm)
    bpm++;
    bpm_textbox.Text = bpm.ToString();

}

First you must convert your bpm variable to Int, since you can not add 1 to a String.

    
answered by 10.05.2018 в 16:46