memcpy in C#

  • Thread starter Thread starter Sidney Zhang
  • Start date Start date
S

Sidney Zhang

Hi:
We need to manipulate data block in C#, is there anything in C# similiar as
memcpy/memset in C++?
copy bytes one by one is really a night mare for me.

Thanks
Sidney
 
Sidney said:
We need to manipulate data block in C#, is there anything in C# similiar as
memcpy/memset in C++?

(Actually memcpy/memset are usually libc or compiler-lib functions)

Try timing System.Array.Copy, I would expect it to have (at least
mildly) optimized code for value-type arrays.
copy bytes one by one is really a night mare for me.

How much does it slow your application down, compared to your
expectation and to a C-like implementation?
 
Back
Top