Unsafe.Copy Method

Definition

Overloads

Copy<T>(Void*, T)

Copies a value of type T to the given location.

Copy<T>(T, Void*)

Copies a value of type T to the given location.

Copy<T>(Void*, T)

Copies a value of type T to the given location.

public:
generic <typename T>
 static void Copy(void* destination, T % source);
public static void Copy<T> (void* destination, ref T source);
public static void Copy<T> (void* destination, ref T? source);
static member Copy : nativeptr<unit> * 'T -> unit

Type Parameters

T

The type of value to copy.

Parameters

destination
Void*

The location to copy to.

source
T

A reference to the value to copy.

Copy<T>(T, Void*)

Copies a value of type T to the given location.

public:
generic <typename T>
 static void Copy(T % destination, void* source);
public static void Copy<T> (ref T destination, void* source);
public static void Copy<T> (ref T? destination, void* source);
static member Copy : 'T * nativeptr<unit> -> unit

Type Parameters

T

The type of value to copy.

Parameters

destination
T

The location to copy to.

source
Void*

A pointer to the value to copy.

Applies to