Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

.NET Framework (current version)
 

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.

Namespace:   System
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.

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