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.
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition |
|---|---|
| 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.