在C#Win中将Bytecode转换为Char。形成 [英] Convert Bytecode to Char in c# Win. Form

查看:148
本文介绍了在C#Win中将Bytecode转换为Char。形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在c#Win中将字节码转换为字符。表格

示例

如果字节代码 1111111111111101 那么答案应该来



任何一段代码片段都表示赞赏





提前致谢

How to convert Bytecode to Char in c# Win. Form
Example
if the byte code is 1111111111111101 then answer should come

any piece of code snippet is appreciated


Thanks in advance

推荐答案

尝试将其投射:

Try just casting it:
byte b = Convert.ToByte("01100001", 2);
char c = (char)b;
Console.WriteLine(c);

(你不能在C#中输入二进制常量,只是十六进制或十进制)

(You can't enter binary constants in C#, just hex or decimal)


这篇关于在C#Win中将Bytecode转换为Char。形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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