使用System.Text.Encoding.Default.GetString时缺少逗号

编程入门 行业动态 更新时间:2024-10-23 13:27:40
本文介绍了使用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时缺少逗号

本文发布于:2023-11-10 06:23:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574596.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:逗号   Text   System   Encoding   GetString

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!