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...

what is work of continue statement in C#?

Answer Posted / aditya n bokade ctrainer

continue statement skips a particular PASS of the loop.

continue statement:

--> skips all the statements mentioned after it inside a loop
--> goes to the next pass by incrementing counter variable

eg.

for (int i = 1; i <= 10; i++)
{
if (i % 2 == 0)
{
continue;
}
MessageBox.Show(i.ToString());//will be skipped when i is even
}

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between tostring() vs convert.tostring() vs (string) cast

1097


How do you implement thread synchronization (object.wait, notify,and criticalsection) in c#?

1127


Explain what is copy constructor?

1070


Can fields inside a class be virtual?

1027


What all details the assembly manifest will contain?

866


What is difference between constants and read-only?

1035


if a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

1135


What is the use of system.environment class in c#.net?

1020


How is method overriding different from overloading?

1102


What is constants in c#?

973


Why generics are used?

955


How do I convert a string to an int in c#?

1036


Explain how do you directly call a native function exported from a dll?

976


Can delegates be used as callbacks?

965


What are synchronous and asynchronous operations?

1054