List<T>.Slice(Int32, Int32) Método

Definição

Cria uma cópia superficial de um conjunto de elementos na fonte 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)

Parâmetros

start
Int32

O índice baseado List<T> em zero no qual o intervalo começa.

length
Int32

O comprimento do campo de tiro.

Devoluções

Uma cópia superficial de um conjunto de elementos na fonte List<T>.

Exceções

start é inferior a 0.

-ou-

length é inferior a 0.

start e length não denotam um intervalo válido de elementos no List<T>.

Aplica-se a