在c#中有没有类似memcpy这样的函数来按字节组织数据的呢?
或者是其它途径也可以的。

解决方案 »

  1.   

    Array.Copy (Array, Array, Int32)?
      

  2.   

    谢谢你的回答,
    此方法等效于标准 C/C++ 函数 memmove,而不是 memcpy。
      

  3.   

     byte[] buffer = new byte[256];
     byte identify = 0x02;
    BitConverter.GetBytes(identify).CopyTo(buffer, 0);
    int bufferPos = sizeof(byte);
    Buffer.BlockCopy(content, 0, buffer, bufferPos, (int)contentlength);呵呵,自己搞定了,还是谢谢楼上的,给我提供灵感。