---
title: "What is the difference between “continue” and “break” statements in C#?"  
description: "What is the difference between “continue” and “break” statements in C#?"  
author: "Anonymous User"  
published: 2018-03-22  
updated: 2020-09-24  
canonical: https://www.mindstick.com/interview/23364/what-is-the-difference-between-continue-and-break-statements-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 4 minutes  

---

# What is the difference between “continue” and “break” statements in C#?

Using break statement in c#, We can 'jump out of a loop'.When we use continue statement we will just skip the current interation then resume our iteration .

## Break statement

```
using System;
using System.Collections;
using System.Linq;
using System.Text;

namespace break_example
    {
        Class brk_stmt {
            public static void main(String[] args) {
                for (int i = 0; i <= 10; i++) {
                    if (i == 5) {
                        break;
                    }
                    Console.WriteLine("The number is " + i);
                    Console.ReadLine();

                }
            }
        }

    }
```

## Continue Statement

```
using System;
using System.Collections;
using System.Linq;
using System.Text;

namespace continue_example
{
    Class cntnu_stmt
    {
        public static void main(String[]
        {
            for (int i = 0; i <= 10; i++)
            {
                if (i == 5)
                {
                    continue;
                }
                Console.WriteLine(“The number is "+ i);
                Console.ReadLine();

            }
        }
    }

}  
```

## Answers

### Answer by Anonymous User

Using break statement in c#, We can 'jump out of a loop'.When we use continue statement we will just skip the current interation then resume our iteration .

## Break statement

```
using System;
using System.Collections;
using System.Linq;
using System.Text;

namespace break_example
    {
        Class brk_stmt {
            public static void main(String[] args) {
                for (int i = 0; i <= 10; i++) {
                    if (i == 5) {
                        break;
                    }
                    Console.WriteLine("The number is " + i);
                    Console.ReadLine();

                }
            }
        }

    }
```

## Continue Statement

```
using System;
using System.Collections;
using System.Linq;
using System.Text;

namespace continue_example
{
    Class cntnu_stmt
    {
        public static void main(String[]
        {
            for (int i = 0; i <= 10; i++)
            {
                if (i == 5)
                {
                    continue;
                }
                Console.WriteLine(“The number is "+ i);
                Console.ReadLine();

            }
        }
    }

}  
```


---

Original Source: https://www.mindstick.com/interview/23364/what-is-the-difference-between-continue-and-break-statements-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
