List<T>.Slice(Int32, Int32) Metoda

Definice

Vytvoří mělkou kopii rozsahu prvků ve zdroji List<T>.

public:
 System::Collections::Generic::List<T> ^ Slice(int start, int length);
public System.Collections.Generic.List<T> Slice (int start, int length);
member this.Slice : int * int -> System.Collections.Generic.List<'T>
Public Function Slice (start As Integer, length As Integer) As List(Of T)

Parametry

start
Int32

Index založený na List<T> nule, od kterého oblast začíná.

length
Int32

Délka rozsahu.

Návraty

Mělká kopie rozsahu prvků ve zdroji List<T>.

Výjimky

start je menší než 0.

-nebo-

length je menší než 0.

start a length neoznamují platný rozsah prvků v objektu List<T>.

Platí pro