C# – How to convert Decimal to ASCII in c#.net


Can anyone help me on how to convert decimal to ASCII using C#.net?

When I input a decimal into the textbox1, after clicking the CONVERT button then the result will display in textbox2. My problem is the code on how to convert decimal to ASCII. How to do this?

Best Solution

Here is a simple solution I found on the net. See if it works for you. 65 being the ASCII character.

char c = Convert.ToChar(65);
string d = c.ToString();

Source: http://forums.asp.net/t/1827433.aspx?Converting+decimal+value+to+equivalent+ASCII+character+in+c+

Another source: Decimal to ASCII Convertion