Memory2D<T>.DangerousCreate(Object, T, Int32, Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new Memory2D<T> instance from an arbitrary object.
public static Microsoft.Toolkit.HighPerformance.Memory2D<T> DangerousCreate (object instance, ref T value, int height, int width, int pitch);
static member DangerousCreate : obj * 'T * int * int * int -> Microsoft.Toolkit.HighPerformance.Memory2D<'T>
Public Shared Function DangerousCreate (instance As Object, ByRef value As T, height As Integer, width As Integer, pitch As Integer) As Memory2D(Of T)
Parameters
- value
- T
The target reference to point to (it must be within instance
).
- height
- Int32
The height of the 2D memory area to map.
- width
- Int32
The width of the 2D memory area to map.
- pitch
- Int32
The pitch of the 2D memory area to map.
Returns
A Memory2D<T> instance with the specified parameters.
Exceptions
Thrown when one of the input parameters is out of range.
Remarks
The value
parameter is not validated, and it's responsibility of the caller to ensure it's valid.