Unsafe.CopyBlockUnaligned Method

Definition

Overloads

CopyBlockUnaligned(Byte, Byte, UInt32)

Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.

CopyBlockUnaligned(Void*, Void*, UInt32)

Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.

CopyBlockUnaligned(Byte, Byte, UInt32)

Source:
Unsafe.cs
Source:
Unsafe.cs
Source:
Unsafe.cs

Important

This API is not CLS-compliant.

Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.

public:
 static void CopyBlockUnaligned(System::Byte % destination, System::Byte % source, System::UInt32 byteCount);
public static void CopyBlockUnaligned (ref byte destination, ref byte source, uint byteCount);
[System.CLSCompliant(false)]
public static void CopyBlockUnaligned (ref byte destination, ref byte source, uint byteCount);
static member CopyBlockUnaligned : byte * byte * uint32 -> unit
[<System.CLSCompliant(false)>]
static member CopyBlockUnaligned : byte * byte * uint32 -> unit
Public Shared Sub CopyBlockUnaligned (ByRef destination As Byte, ByRef source As Byte, byteCount As UInteger)

Parameters

destination
Byte

The managed pointer corresponding to the destination address to copy to.

source
Byte

The managed pointer corresponding to the source address to copy from.

byteCount
UInt32

The number of bytes to copy.

Attributes

Remarks

This API corresponds to the unaligned.1 cpblk opcode sequence. No alignment assumptions are made about the destination or source pointers. See ECMA-335, Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information.

Caution

This API is not intended for copying arbitrary-length runs of memory. Consider instead using MemoryCopy or CopyTo for this scenario.

Applies to

CopyBlockUnaligned(Void*, Void*, UInt32)

Source:
Unsafe.cs
Source:
Unsafe.cs
Source:
Unsafe.cs

Important

This API is not CLS-compliant.

Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.

public:
 static void CopyBlockUnaligned(void* destination, void* source, System::UInt32 byteCount);
public static void CopyBlockUnaligned (void* destination, void* source, uint byteCount);
[System.CLSCompliant(false)]
public static void CopyBlockUnaligned (void* destination, void* source, uint byteCount);
static member CopyBlockUnaligned : nativeptr<unit> * nativeptr<unit> * uint32 -> unit
[<System.CLSCompliant(false)>]
static member CopyBlockUnaligned : nativeptr<unit> * nativeptr<unit> * uint32 -> unit

Parameters

destination
Void*

The unmanaged pointer corresponding to the destination address to copy to.

source
Void*

The unmanaged pointer corresponding to the source address to copy from.

byteCount
UInt32

The number of bytes to copy.

Attributes

Remarks

This API corresponds to the unaligned.1 cpblk opcode sequence. No alignment assumptions are made about the destination or source pointers. See ECMA-335, Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information.

Caution

This API is not intended for copying arbitrary-length runs of memory. Consider instead using MemoryCopy or CopyTo for this scenario.

Applies to