Jagged Uint8数组转换为C#字节
Jagged Uint8 array convert to C# byte
我在c++中有一个锯齿状的uint8
数组:
UINT8 ras[2][3] = {{1,2,3},{4,5,6}}
我需要一些方法将其用作c#中的字节数组。类似的东西
byte[2][3] ras = {{1,2,3},{4,5,6}}
我有很多uint8
阵列,所以手动操作不是一种选择。有什么想法吗?
如果我理解上面对您问题的注释,那么您只是缺少了一些C#语法。
C#语法为:
byte[][] ras = new byte[][] {new byte[] {1,2,3}, new byte[] {4,5,6}};
它比等价的c++要详细得多,但很容易用sed进行机械翻译。
相关文章:
- 如何在连接器 C++ 中将原始字节转换为字符串
- 将 char[] 数组转换为字节,然后将字节转换为 int,反之亦然
- 如何在 c++ 中将字节转换为 ASCII 十六进制表示形式?
- OPENSSL 将二进制字节转换为 SHA256 C++
- 如何将音频字节转换为样本
- C++ 如何将 char[] 中的多个字节转换为一个整数
- 删除字节转换的char*
- 如何将二进制字节转换为可打印的数值
- 将 MFRC522 UID 十六进制字节转换为可打印的小数
- 用c++将十六进制字符串切碎,并将中的每个字节转换为十进制
- Qt是否有一种将字节转换为int的方法,反之亦然
- UCS-4 到 Solaris 上的多字节转换
- 使用 C++ 将四个字节转换为整数
- 将字节转换为无符号整数的最快方法
- 如何在mac上将多字节转换为宽字符
- 将字节转换为整数
- 在Arduino错误时将4个字节转换为长字节
- 更正从C++到delphi AnsiString的字节转换
- 用C++将4个字节转换为3个字节
- 正在将字节转换为char数组,然后再转换回来