Hello,
Below is the sample class:
public class CountDown
{
public delegate void CountDownCompleteArgs();
public event CountDownCompleteArgs OnCountComplete;
private int min;
private int max;
public void Count(int min, int max)
{
this.min = min;
this.max = max;
var thread = new Thread(StartCount);
thread.IsBackground = true;
thread.Start();
}
private void StartCount()
{
for (int i = min; i < max; i++)
Thread.Sleep(100);
if (OnCountComplete != null)
OnCountComplete();
}
}
I want to implement this in my asp.net webform. Below is the implementation:
CountDown c = new CountDown();
protected void Page_Load(object sender, EventArgs e)
...
Go to the complete details ...