How to declare string to be equal on textbox.text after that

Posted by Nikola Obretenov on Stack Overflow See other posts from Stack Overflow or by Nikola Obretenov
Published on 2012-10-27T10:57:49Z Indexed on 2012/10/27 11:00 UTC
Read the original article Hit count: 247

Filed under:

where is the mistake here:

    static int count = 0;
    string s;
    private void SetClock_Click(object sender, EventArgs e)
    {
        txtSend.Text = s;
        count++;

        label5.Text = count.ToString("X2");

        DateTime time = DateTime.Now;

        s = "4D-" + "1A-" + "2B-" + "3C-" +
        (label5.Text.ToString());

}

on first click i get a click value 01, but dont get the txtsend.text ... on second click i get value 02 but in txtsend.text i get the 4D-1A-2B-3C-01

© Stack Overflow or respective owner

Related posts about c#