Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.



One start and stop button is there and one textbox is there.when you click start button ,it will di..

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

Post New Answer

More C Sharp Interview Questions

Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

0 Answers   Siebel,


What are c# attributes and its significance?

0 Answers  


code for arranging given number in possible permutation ways ex:123,321,312,132,231,213.

0 Answers  


Why is c# better than java?

0 Answers  


What does protected internal access modifier mean?

0 Answers  


What is ilist c#?

0 Answers  


Can a private virtual method can be overridden?

0 Answers  


Is c# dictionary a hash table?

0 Answers  


What are types of constructor?

0 Answers  


State whether it is true to test a Web service you must create a windows application or Web application to consume this service or not?

0 Answers   Siebel,


What are the applications of c#?

3 Answers  


What is assembly and dll in c#?

0 Answers  


Categories