Прочетете на английски Редактиране

Споделяне чрез


PointerArrayMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn Struct

Definition

Represents a marshaller for marshalling an array from managed to unmanaged.

C#
public ref struct PointerArrayMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn where T : struct where TUnmanagedElement : struct

Type Parameters

T
TUnmanagedElement
Inheritance
PointerArrayMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn

Properties

BufferSize

Gets the requested caller-allocated buffer size.

Methods

Free()

Frees resources.

FromManaged(T*[], Span<TUnmanagedElement>)

Initializes the PointerArrayMarshaller<T,TUnmanagedElement>.ManagedToUnmanagedIn marshaller.

GetManagedValuesSource()

Returns a span that points to the memory where the managed values of the array are stored.

GetPinnableReference()

Returns a reference to the marshalled array.

GetPinnableReference(T*[])

Gets a pinnable reference to the managed array.

GetUnmanagedValuesDestination()

Returns a span that points to the memory where the unmanaged values of the array should be stored.

ToUnmanaged()

Returns the unmanaged value representing the array.

Applies to

Продукт Версии
.NET 7, 8, 9, 10