Marshal. Create From Pinned Array<T>(T, Int32, Int32) Method
Creates a new memory buffer over the portion of the pre-pinned target array beginning at the
start index and consisting of
public: generic <typename T> static Memory<T> CreateFromPinnedArray(cli::array <T> ^ array, int start, int length);
public static Memory<T> CreateFromPinnedArray<T> (T array, int start, int length);
static member CreateFromPinnedArray : 'T * int * int -> Memory<'T>
Public Shared Function CreateFromPinnedArray(Of T) (array As T(), start As Integer, length As Integer) As Memory(Of T)
The type of the array.
The pre-pinned source array.
The index of
array at which to begin the memory block.
The number of items to include in the memory block.
array is covariant, and the type of
array is not exactly
The array must already be pinned before this method is called, and that array must not be unpinned while the Memory<T> buffer that it returns is still in use. Calling this method on an unpinned array could result in memory corruption.