While click the button count how many times the same person had clicked the button

Satyapriyanayak
Posted by Satyapriyanayak under C# category on | Points: 40 | Views : 1075
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

static int count = 0;
private void button1_Click(object sender, EventArgs e)
{
count++;
int totalcount = count;
textBox1.Text = totalcount.ToString();
}
}
}

Comments or Responses

Login to post response