Buffer::MemoryCopy Method (Void*, Void*, UInt64, UInt64)
Copies a number of bytes specified as an unsigned long integer value from one address in memory to another.
This API is not CLS-compliant.
This API is not CLS-compliant.
Assembly: mscorlib (in mscorlib.dll)
public: [SecurityCriticalAttribute] [CLSCompliantAttribute(false)] static void MemoryCopy( void* source, void* destination, unsigned long long destinationSizeInBytes, unsigned long long sourceBytesToCopy )
Parameters
- source
-
Type:
System::Void*
The address of the bytes to copy.
- destination
-
Type:
System::Void*
The target address.
- destinationSizeInBytes
-
Type:
System::UInt64
The number of bytes available in the destination memory block.
- sourceBytesToCopy
-
Type:
System::UInt64
The number of bytes to copy.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | sourceBytesToCopy is greater than destinationSizeInBytes. |
This method copies sourceBytesToCopy bytes from the address specified by source to the address specified by destination. If the buffers overlap and the difference between destination minus source is less than sourceBytesToCopy, the source block is copied to the destination block in reverse order.
Available since 10
.NET Framework
Available since 4.6