Επεξεργασία

Κοινή χρήση μέσω


Unsafe.WriteUnaligned Method

Definition

Overloads

WriteUnaligned<T>(Byte, T)

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

WriteUnaligned<T>(Void*, T)

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

WriteUnaligned<T>(Byte, T)

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

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

public:
generic <typename T>
 static void WriteUnaligned(System::Byte % destination, T value);
public static void WriteUnaligned<T> (ref byte destination, T value);
static member WriteUnaligned : byte * 'T -> unit
Public Shared Sub WriteUnaligned(Of T) (ByRef destination As Byte, value As T)

Type Parameters

T

The type of the value to write.

Parameters

destination
Byte

A managed pointer containing the address to write to.

value
T

The value to write.

Remarks

Caution

The caller must ensure that there are SizeOf<T>() bytes of writable memory available starting at the location pointed to by destination. Access violations may occur if this requirement is not met.

Applies to

WriteUnaligned<T>(Void*, T)

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

Important

This API is not CLS-compliant.

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

public:
generic <typename T>
 static void WriteUnaligned(void* destination, T value);
public static void WriteUnaligned<T> (void* destination, T value);
[System.CLSCompliant(false)]
public static void WriteUnaligned<T> (void* destination, T value);
static member WriteUnaligned : nativeptr<unit> * 'T -> unit
[<System.CLSCompliant(false)>]
static member WriteUnaligned : nativeptr<unit> * 'T -> unit

Type Parameters

T

The type of the value to write.

Parameters

destination
Void*

A managed pointer containing the address to write to.

value
T

The value to write.

Attributes

Remarks

Caution

The caller must ensure that there are SizeOf<T>() bytes of writable memory available starting at the location pointed to by destination. Access violations may occur if this requirement is not met.

Applies to