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#?

Answers were Sorted based on User's Feedback



what is work of continue statement in C#?..

Answer / 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

what is work of continue statement in C#?..

Answer / prem

void main(){
int i;
for(i=1;i<10;i++)
{

console.write("prem");
continue;
c.w("hi");
}
}
It will print prem 9 times not print hi.

Is This Answer Correct ?    16 Yes 0 No

what is work of continue statement in C#?..

Answer / ramya

The continue statement passes control to the next iteration
of the enclosing iteration statement in which it appears
using System;
class ContinueTest
{
public static void Main()
{
for (int i = 1; i <= 10; i++)
{
if (i < 9)
continue;
Console.WriteLine(i);
}
}
}

o/p:
9
10

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Why do we need singleton class in c#?

0 Answers  


What is the difference between abstraction and encapsulation in c#?

0 Answers  


How do you create partial methods?

0 Answers  


What are STA And MTA in threading?

4 Answers   Kanbay,


Define the term immutable ?

0 Answers   Siebel,


Is c# still popular?

0 Answers  


What is extended class in c#?

0 Answers  


How can encapsulation be achieved?

0 Answers  


How do you type a null character?

0 Answers  


How do you generate documentation from the C# file commented properly with a command-line compiler?

1 Answers  


What is the difference between a class and an object c#?

0 Answers  


How do I move from one form to another in c#?

0 Answers  


Categories