programming-examples/c-sharp/Conversions/C# Program to Covert HexaDecimal Number to Decimal.cs
2019-11-15 12:59:38 +01:00

27 lines
623 B
C#

/*
* C# Program to Covert HexaDecimal Number to Decimal
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string Input;
Console.WriteLine("Enter a Hexadecimal Number :");
Input = Console.ReadLine();
int Output = int.Parse(Input, System.Globalization.NumberStyles.HexNumber);
Console.WriteLine("The Decimal value is " + Output);
Console.Read();
}
}
}
/*
Enter a HexaDecimal Number : ABC
The Decimal value is : 2748