简体   繁体   English

如何在我的字节数组中包含这个字节?

[英]How do I include this byte in my byte array?

I'm on Windows 10. I am using Visual Studio 2019. Language C#我在 Windows 10。我正在使用 Visual Studio 2019。语言 C#

I am trying to include this byte into my byte array, but it just gives me an error.我试图将此字节包含到我的字节数组中,但它只是给了我一个错误。

Please help.请帮忙。

byte[] mybyte = new byte[] { 74, 68, 69, 73, 69, 73, 5F, 73, 65, 63, 72, 65, 74, 61, 73, 64, 06, 00, 00, 00 };

The one I am trying to include is 5F , but it gives me an error when I try to include it.我要包含的一个是5F ,但是当我尝试包含它时它给了我一个错误。

Thanks for the help madreflection感谢 madreflection 的帮助

The fix was to add 0x to the start of the bytes.解决方法是将 0x 添加到字节的开头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM