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.
Namespace: KGySoft.CollectionsAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public Array2D(
ArraySection<T> buffer,
int height,
int width
)
Public Sub New (
buffer As ArraySection(Of T),
height As Integer,
width As Integer
)
public:
Array2D(
ArraySection<T> buffer,
int height,
int width
)
new :
buffer : ArraySection<'T> *
height : int *
width : int -> Array2D
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.