Buffer::MemoryCopy Method (Void*, Void*, Int64, Int64)

.NET Framework (current version)
 

Copies a number of bytes specified as a long integer value from one address in memory to another.

This API is not CLS-compliant.

This API is not CLS-compliant.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public:
[SecurityCriticalAttribute]
[CLSCompliantAttribute(false)]
static void MemoryCopy(
	void* source,
	void* destination,
	long long destinationSizeInBytes,
	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::Int64

The number of bytes available in the destination memory block.

sourceBytesToCopy
Type: System::Int64

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.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.6
Return to top
Show: