Add new text to label [closed]

You need three things:

  1. A button click handler (assuming you are clicking a single button)
  2. A class-scoped integer that counts the number of clicks
  3. A series or if/else statements or a switch statement with cases that change the action based on the number of your click.

Light code sample:

 private int _btnClickCount = 0; // your class-scoped variable

 // your button click handler
 private void SomeButtonClicked(object sender, EventArgs args) {
     if (_btnClickCount == 0)
          // do something
     else if (_btnClickCount == 1)
          // do something else
     // etc.


Browse More Popular Posts

Leave a Comment