将Ascii值转换为String [英] converting Ascii Value to String

查看:130
本文介绍了将Ascii值转换为String的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我试图编写从字符串转换为ascii然后从ascii转换回字符串的小程序。

从字符串转换为ascii是好的,但是要从ascii转换为字符串,它会给我ascii not string。

hello,
I m trying to write small program convering from string to ascii then converting back from ascii to string.
converting from string to ascii is ok, but to convert from ascii to string it gives me the ascii not string.

推荐答案

检查这些:

1. ASCIIEncoding.GetString方法(字节[],Int32,Int32) [ ^ ]

2. http://www.dotnetperls.com/convert-string-byte-array [ ^ ]
Check these out:
1. ASCIIEncoding.GetString Method (Byte[], Int32, Int32)[^]
2. http://www.dotnetperls.com/convert-string-byte-array[^]


试试吧....



string str = char.ConvertFromUtf32(65)



希望有所帮助
Try This....

string str = char.ConvertFromUtf32(65)

Hope it helps


这篇关于将Ascii值转换为String的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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