---
title: "do While Loop In c#"  
description: "do While Loop In c#"  
author: "Anonymous User"  
published: 2015-12-01  
updated: 2015-12-01  
canonical: https://www.mindstick.com/forum/33670/do-while-loop-in-c-sharp  
category: "c#"  
tags: ["c#", "loop"]  
reading_time: 1 minute  

---

# do While Loop In c#

I want to use do While [Loop in c#](https://www.mindstick.com/forum/33669/while-loop-in-c-sharp) Please Help me how to use it.

## Replies

### Reply by Anonymous User

do [while loop](https://www.mindstick.com/forum/34579/while-loop-in-python) treats same as while loop but only differences between them is that, do while executes at least one time. The code executes first then check for specified loop condition. But in while loop, the specified loop condition evaluated first then executes the code.

```
using System;namespace dowhile{    class Program    {        static void Main(string[] args)        {            int Number, i, Result;            Number = 12;            i = 1;            do            {                Result = Number * i;                Console.WriteLine("{0} x {1} = {2}", Number, i, Result);                i++;            }                       while (i <= 12);            Console.ReadLine();        }    }}
```

![do While Loop In c#](https://www.mindstick.com/mindstickforums/d32869dc-5cc4-4c71-99a9-335910ce78a7/images/4b117651-7f97-4efc-b017-c69aa050c79b.png)


---

Original Source: https://www.mindstick.com/forum/33670/do-while-loop-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
