byte[] byteArray = System.Text.Encoding.Default.GetBytes(content);

Byte[] ThisByte = new Byte[1];
Buffer.BlockCopy(byteArray, 30, ThisByte, 0, 1);
string str=Encoding.Default.GetString(ThisByte);

 

 

 

 

 

 //
        // 摘要:
        //     将指定数目的字节从起始于特定偏移量的源数组复制到起始于特定偏移量的目标数组。
        //
        // 参数:
        //   src:
        //     源缓冲区。
        //
        //   srcOffset:
        //     src 中从零开始的字节偏移量。
        //
        //   dst:
        //     目标缓冲区。
        //
        //   dstOffset:
        //     dst 中从零开始的字节偏移量。
        //
        //   count:
        //     要复制的字节数。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     src 或 dst 为 null。
        //
        //   T:System.ArgumentException:
        //     src 或 dst 不是基元数组。- 或 -src 的长度小于 srcOffset 加上 count。- 或 -dst 的长度小于 dstOffset 加上
        //     count。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     srcOffset、dstOffset 或 count 小于 0。
        [SecuritySafeCritical]
        public static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count);

相关文章:

  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2021-05-29
  • 2022-01-12
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-11-20
相关资源
相似解决方案