Skip to content

Convert hexadecimal value into alphanumerical value

Nitin Sharma

Asked Jul 8, 2015, 1:59 AM EDT1 answer
Share
LinkedInX
hello
i have a window application in this application i need to convert hexa decimal value into alphanumerical value , can any body tell me how to do

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    C#
     using System;
     using  System.Collections.Generic;
     using System.Linq;
     using System.Text;
    
     namespace ConsoleApplication15
     {
         class Program
         {
             static void  Main(string[] args)
             {
                 string hexavalues  = "47 6F 6F 64 20 4D 6F 72 6E 69 6E 67 21";
                 string[] strsplit  = hexavalues.Split(' ');
                 foreach (String  hexa in strsplit)
                 {
                     int values =  Convert.ToInt32(hexa, 16);
                     string  strvalue = Char.ConvertFromUtf32(values);
                     char character  = (char)values;
                      Console.WriteLine("hexadecimal value = {0}, int value = {1}, char value = {2} or  {3}",
                                            hexa, values, strvalue, character);
                 }
                 Console.ReadLine();
             }
         }
     }
    0