using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
class myClass
{
static public int counter = 0;
}
public Form1()
{
InitializeComponent();
timer1.Interval = 200;
timer1.Start();
timer1.Tick += timer1_Tick;
}
private void timer1_Tick(object sender, EventArgs e)
{
myClass.counter++;
label1.Text = myClass.counter.ToString();
}
}
}