ArrayExtensionsAsSectionT(ArraySegmentT) Method

Gets the specified ArraySegmentT as an ArraySectionT instance. No heap allocation occurs when using this method.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public static ArraySection<T> AsSection<T>(
	this ArraySegment<T> arraySegment
)

Parameters

arraySegment  ArraySegmentT
The ArraySegmentT to create the ArraySectionT from.

Type Parameters

T
The type of the elements in the array.

Return Value

ArraySectionT
An ArraySectionT instance for the specified ArraySegmentT.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ArraySegmentT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also