ArrayExtensions Class

Provides extension methods for arrays.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public static class ArrayExtensions
Inheritance
Object    ArrayExtensions

Methods

AsArray2DT(ArraySegmentT, Int32, Int32) Gets an Array2DT wrapper for the specified ArraySegmentT. The array segment must have enough capacity for the specified height and width. No heap allocation occurs when using this method.
AsArray2DT(T, Int32, Int32) Gets an Array2DT wrapper for the specified array. The array must have enough capacity for the specified height and width. No heap allocation occurs when using this method.
AsArray3DT(ArraySegmentT, Int32, Int32, Int32) Gets an Array3DT wrapper for the specified ArraySegmentT. The array segment must have enough capacity for the specified depth, height and width. No heap allocation occurs when using this method.
AsArray3DT(T, Int32, Int32, Int32) Gets an Array3DT wrapper for the specified array. The array must have enough capacity for the specified depth, height and width. No heap allocation occurs when using this method.
AsSectionT(ArraySegmentT) Gets the specified ArraySegmentT as an ArraySectionT instance. No heap allocation occurs when using this method.
AsSectionT(T) Gets the specified array as an ArraySectionT instance. No heap allocation occurs when using this method.
AsSectionT(T, Int32) Gets an ArraySectionT instance, which represents a section of the specified array. No heap allocation occurs when using this method.
AsSectionT(T, Int32, Int32) Gets an ArraySectionT instance, which represents a section of the specified array. No heap allocation occurs when using this method.
CastTFrom, TTo(ArraySegmentTFrom) Reinterprets the specified arraySegment by returning a CastArrayTFrom, TTo struct, so its element type is cast from TFrom to TTo. No heap allocation occurs when using this method.
CastTFrom, TTo(TFrom) Reinterprets the specified array by returning a CastArrayTFrom, TTo struct, so its element type is cast from TFrom to TTo. No heap allocation occurs when using this method.
Cast2DTFrom, TTo(ArraySegmentTFrom, Int32, Int32) Reinterprets the specified arraySegment as a two-dimensional CastArray2DTFrom, TTo struct, while its element type is cast from TFrom to TTo. No heap allocation occurs when using this method.
Cast2DTFrom, TTo(TFrom, Int32, Int32) Reinterprets the specified array as a two-dimensional CastArray2DTFrom, TTo struct, while its element type is cast from TFrom to TTo. No heap allocation occurs when using this method.
Cast3DTFrom, TTo(ArraySegmentTFrom, Int32, Int32, Int32) Reinterprets the specified arraySegment as a three-dimensional CastArray3DTFrom, TTo struct, while its element type is cast from TFrom to TTo. No heap allocation occurs when using this method.
Cast3DTFrom, TTo(TFrom, Int32, Int32, Int32) Reinterprets the specified array as a three-dimensional CastArray3DTFrom, TTo struct, while its element type is cast from TFrom to TTo. No heap allocation occurs when using this method.

See Also