我需要帮助将数字从字节数组转换为 C# 中的字符串。
这是我的代码:
string Astr = "123456789";
byte[] AByte = Astr.Select(c => (byte)(c - '0')).ToArray();
Astr = AByte.ToString(); // This is problem - I need convert numbers back to string
谢谢你的想法:)
最佳答案
这个呢,
Astr = new String(AByte.Select (b=>(Char)(b+ 48)).ToArray())
关于c# - 将字节数组转换为数字字符串 [c#],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21713099/