Below is a sample sourecode demonstrating the conversion of the hexadecimal value to decimal number in c#.
How to Convert Hexadecimal value to Decimal number in C# ?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { internal class Program { private static void Main(string[] args) { string Input = "A"; int Output = int.Parse(Input, System.Globalization.NumberStyles.HexNumber); Console.WriteLine("The Decimal value of A is " + Output); Console.Read(); } } }
Leave a Reply