what is work of continue statement in C#?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is method in c#?

479


What is the difference between User controls and Custom Controls?

557


What is difference between internal and protected internal in c#?

468


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

488


What is use of hashtable in c#?

482






How do I enforce const correctness in c#?

534


What is a delegate? How can it works?

527


What can be done with c#?

443


Can a class be private in c#?

500


what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?

1452


What do you mean by directing?

493


Can you explicitly call a destructor?

532


What is the use of iqueryable in c#?

482


What is difference between constants and readonly in c#?

488


What are the differences between static, public and void in c#?

570