Array2DT(ArraySectionT, Int32, Int32) Constructor

Initializes a new instance of the Array2DT struct from an existing ArraySectionT using the specified height and width. No heap allocation occurs when using this constructor overload.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public Array2D(
	ArraySection<T> buffer,
	int height,
	int width
)

Parameters

buffer  ArraySectionT
The desired underlying buffer for the Array2DT instance to be created. It must have sufficient capacity for the specified dimensions. Even if buffer owns an array rented from the ArrayPoolT, calling the Dispose method on the created Array2DT instance does not return the underlying array to the pool. In such case it is the caller's responsibility to release the buffer.
height  Int32
The height of the array to be created.
width  Int32
The width of the array to be created.

See Also