ArraySegment(T) Constructor (T[])
Collapse the table of content
Expand the table of content

ArraySegment(Of T) Constructor (T())

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the ArraySegment(Of T) structure that delimits all the elements in the specified array.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Sub New ( _
	array As T() _
)

Parameters

array
Type: T ()
The array to wrap.

ExceptionCondition
ArgumentNullException

array is Nothing.

This constructor creates an ArraySegment(Of T) that delimits all the elements of array. That is, the Offset property of the ArraySegment(Of T) is 0 and its Count property is the length of array. To create an ArraySegment(Of T) that delimits only part of an array, use the ArraySegment(Of T)(T(), Int32, Int32) constructor.

The original array must be one-dimensional and must have zero-based indexing.

Multiple ArraySegment(Of T) instances can refer to the same original array and can overlap.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft