如何在c#.net中将十进制转换为ASCII? [英] How to convert Decimal to ASCII in c#.net?

查看:486
本文介绍了如何在c#.net中将十进制转换为ASCII?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我如何使用C#.net将十进制转换为ASCII吗?

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

当我在文本框1中输入小数时,单击转换"按钮后,结果将显示在文本框2中.我的问题是有关如何将十进制转换为ASCII的代码.该怎么做?

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?

推荐答案

这是我在网上找到的简单解决方案.看看是否适合您.65是ASCII字符.

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

来源: http://forums.asp.net/t/1827433.aspx?转换+十进制+值+到+等效+ ASCII +字符+ in + c +

另一个来源:十进制到ASCII转换

这篇关于如何在c#.net中将十进制转换为ASCII?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆