Distinguish between continue and break statement?



Distinguish between continue and break statement?..

Answer / Sushil Dayal

In C#, both continue and break statements are used in loops for control flow. However, they operate differently:n- Continue: When encountered within a loop, the current iteration is ended immediately, and the next iteration begins.n- Break: When encountered within a loop, the entire loop is terminated, and the program continues with the following statement outside the loop.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Why is it called c sharp?

1 Answers  


What is method in c#?

1 Answers  


what are the bugs are faced in a project

3 Answers   Accenture,


Which attribute is used in order that the method can be used as webservice?

1 Answers  


What is difference between === and ==?

1 Answers  


Is list ienumerable c#?

1 Answers  


What is the purpose of namespace?

1 Answers  


How would you describe encapsulation in c#?

1 Answers  


Can we maintain state in webservice?

1 Answers  


What is reflection in c#?

1 Answers  


What is a float?

1 Answers  


Does C# support multiple inheritance?

5 Answers  


Categories