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
What is difference between tostring() vs convert.tostring() vs (string) cast
How do you implement thread synchronization (object.wait, notify,and criticalsection) in c#?
Explain what is copy constructor?
Can fields inside a class be virtual?
What all details the assembly manifest will contain?
What is difference between constants and read-only?
if a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?
What is the use of system.environment class in c#.net?
How is method overriding different from overloading?
What is constants in c#?
Why generics are used?
How do I convert a string to an int in c#?
Explain how do you directly call a native function exported from a dll?
Can delegates be used as callbacks?
What are synchronous and asynchronous operations?