Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

memcpy function in c# [duplicate]

Tags:

c#

.net

Possible Duplicate:
C# memcpy equivalent

What is the equivalent of the memcpy function in c#?

like image 529
Siddiqui Avatar asked Jun 08 '10 10:06

Siddiqui


2 Answers

As already said it depends what you are trying to do... So you can consider one of these... check the links:

  • Array.Copy
  • Object.MemberwiseClone
  • ICloneable Interface

There may be other possible options based on your needs...

like image 194
Incognito Avatar answered Oct 24 '22 08:10

Incognito


Buffer.BlockCopy is close, but limited to arrays. I agree it depends what you're trying to do.

like image 5
Matthew Flaschen Avatar answered Oct 24 '22 10:10

Matthew Flaschen