G
Guest
How would I program an interupt. If I have two buttons on a form, one starts
a loop and the other stops the loop. What code would I need to add?
private void button1_Click(object sender, System.EventArgs e)
{
int a= 1;
int b= 0;
while (a != 0)
{
b += 1;
}
}
private void button2_Click(object sender, System.EventArgs e)
{
//interrupt code
}
a loop and the other stops the loop. What code would I need to add?
private void button1_Click(object sender, System.EventArgs e)
{
int a= 1;
int b= 0;
while (a != 0)
{
b += 1;
}
}
private void button2_Click(object sender, System.EventArgs e)
{
//interrupt code
}