Windows Dev Center

ArraySegment<T> Constructor (T[])

Initializes a new instance of the ArraySegment<T> structure that delimits all the elements in the specified array.

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

public ArraySegment(
	T[] array


Type: T []
The array to wrap.


array is null.

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

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

Multiple ArraySegment<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

© 2015 Microsoft