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 are delegates and why are they required?

702


Are c# destructors the same as c++ destructors?

767


What is the main usage of keyword “virtual” ? How does it work for a method or property?

710


What is serialization in c#?

659


Can I use parseint?

644


Why extension method is static?

652


In gridview in editmode if we want to display information in one combobox based on

2050


What is data annotation in c#?

690


What is difference between abstract class and interface in c#?

695


Can you declare a field readonly?

716


What is the difference between internal and private in c#?

698


How many parameters can a method have c#?

676


List down the differences between public, static and void keywords?

655


Can int be null in c#?

676


How do you sort an array in c#?

690