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

What?s an interface class?

5 Answers   Mind Tree,


Define c# delegate?

0 Answers  


Explain the difference between object type and dynamic type variables in c#?

0 Answers  


What is the difference between Abstract and Interface?

22 Answers   Agile Software, FER, HCL, Sys Universe,


Give some examples for built in datatypes in c#?

0 Answers  


Is it possible to nest cfml conditional tags?

0 Answers   HCL,


Distinguish between system.string and system.text.stringbuilder classes?

0 Answers  


What is a hashset c#?

0 Answers  


What is the difference between a field and a property in c#?

0 Answers  


What are indexers in c# .net?

0 Answers  


What is the max value of int32 in c#?

0 Answers  


Is c# good for beginners?

0 Answers  


Categories