---
title: "Write a C# program to convert Binary number into Decimal number."  
description: "Write a C# program to convert Binary number into Decimal number."  
author: "Steilla Mitchel"  
published: 2021-11-30  
updated: 2021-11-30  
canonical: https://www.mindstick.com/forum/156866/write-a-c-sharp-program-to-convert-binary-number-into-decimal-number  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Write a C# program to convert Binary number into Decimal number.

Write a [C# program](https://www.mindstick.com/forum/156830/how-do-i-make-a-c-sharp-program-that-checks-for-given-array-by-user-which-elements-are-perfect-numbers) to [convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) Binary number into [Decimal](https://www.mindstick.com/forum/34709/please-write-a-program-for-decimal-to-binary-conversion-in-c-sharp) number.

## Replies

### Reply by Beauvais Ginnynw

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy FOR MORE DETAILS.

\

### Reply by Manish Sharma

**Following C# [program](https://www.mindstick.com/blog/12337/scaling-up-your-mentorship-program) is to convert the Binary number into Decimal number,**

```
using System;
public class Program
{
 public static void Main()
 {
    int binary;
   int weight=1;
   int number=0;
   int rem;
   Console.WriteLine('enter the binary number');
   binary=int.Parse(Console.ReadLine());
   while(binary!=0)
   {
           rem=binary%10;
           number=number+rem*weight;
           binary=binary/10;
           weight *=2;
   }
    Console.WriteLine('Decimal number is :'+number);
     }
}
```

## Output:

```
enter the binary number
111111
Decimal number is :63
```


---

Original Source: https://www.mindstick.com/forum/156866/write-a-c-sharp-program-to-convert-binary-number-into-decimal-number

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
