Convert ASCII values from hex to characters

30. May 2009 15:46

C# Code Snippets 

This C# code takes in a list of ASCII values (hexadecimal) and shows the actual characters behind, thus converting hex values to strings.

// An object storing the hex value
string HexValue = "4765656B7065646961";
// An object storing the string value
string StrValue = "";
// While there's still something to convert in the hex string
while (HexValue.Length > 0)
    // Use ToChar() to convert each ASCII value (two hex digits) to the actual character
    StrValue += Convert.ToChar(Convert.ToUInt32(HexValue.Substring(0, 2), 16)).ToString();
    // Remove from the hex object the converted value
    HexValue = HexValue.Substring(2, HexValue.Length - 2);
// Show the converted value
 No Rating

Convert Numbers to Words in C#

24. May 2009 13:18

C# Code Snippets 

Use the below code to convert numbers to words and currency to word programatically (Check the code below). Instead you can create a DLL and use it or whatever the way you likeWink

Download the full Code from the below Link:



Download Link:

Num2Wrd.cs (8.30 kb)


Currently rated 4.6 by 12 people