使用System.Text.Encoding.Default.GetString时缺少逗号 [英] Missing comma when using System.Text.Encoding.Default.GetString

查看:518
本文介绍了使用System.Text.Encoding.Default.GetString时缺少逗号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用System.Text.Encoding.Default.GetString将二进制数据转换为字符串。但结果是缺少逗号。例如,预期结果是N,A但实际结果是NA。

我的代码如下所示:



Hi,

I''m using System.Text.Encoding.Default.GetString to convert binary data to string. But the result is missing comma. For example, the expected result is N,A but the actual result is NA.
My code looks like below:

Byte[] wibytes = (Byte[])dr["WI_location"];
String x = System.Text.Encoding.Default.GetString(wibytes);
lblEWi.Text = x;







请帮忙。



谢谢!




Please help.

Thanks!

推荐答案

尝试输入一个双/并查看结果。



也尝试输入''\ /''而不是只输入一个/。我说的原因是当你在任何字符前插入\时,它会忽略所遵循的字符的任何特殊行为并完全按原样显示。
Try to input a double / and see the outcome.

Also try to input ''\/'' instead of only one /. the reason I say that is when you insert \ in front of any character it ignores any special behaviour by the character that is followed and displays it exactly as it is.


这篇关于使用System.Text.Encoding.Default.GetString时缺少逗号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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