Saturday, 2 December 2017

C# Program to Covert HexaDecimal Number to Decimal


Code:

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();
        }
    }
}


Output:

Enter a HexaDecimal Number : ABC
The Decimal value is : 2748


More C# Programs:





















100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...