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

Why array is faster than arraylist in c#?

940


What is the difference between as and is operators in c#?

869


How can you force derived classes to provide new method implementations for virtual methods?

854


Are arrays value types or reference types?

896


What is c# most used for?

930


How to find type of variable?

918


What is a custom attribute?

846


What is a must for multitasking

925


What is singleordefault c#?

851


Explain when should you call the garbage collector in .net?

864


What is the difference between hashtable and dictionary?

904


Is there an equivalent to the instanceof operator in visual j++?

909


What is transparent caching with aop ?

1019


What can we do to handle multiple exceptions?

971


What types of object can I throw as exceptions?

885