One start and stop button is there and one textbox is
there.when you click start button ,it will display
1,2,3......up to infinite in textbox.when you click stop
button it will stop.
Answer / lince thomas
bool stopBtnClk = false;
bool startBtnClk = false;
private void BtnStart_Click(object sender, EventArgs e)
{
stopBtnClk = false;
startBtnClk = true;
int i = 1;
while (true)
{
textBox1.Text = i.ToString();
i += 1;
Application.DoEvents();
if (stopBtnClk == true)
{
break;
}
}
}
private void BtnStop_Click(object sender, EventArgs e)
{
stopBtnClk = true;
Application.Exit ();
}
Is This Answer Correct ? | 1 Yes | 0 No |
Can we return two values from a function?
what is meant inheritance. can you exaplain what kind inhertance ussed in your project
What is function and method in c#?
What is the delegates in c#?
Explain the functionalities of satellite assembly?
What is threading in c# with example?
What is continue in c#?
Which class does the remote object has to inherit?
What is the difference between internal and protected in c#?
What are the string functions in c#?
What is a singleton unity?
Why is main static in c#?