ArrayList.Adapter(IList) Método

Definição

Cria um ArrayList wrapper para um determinado IList.

public:
 static System::Collections::ArrayList ^ Adapter(System::Collections::IList ^ list);
public static System.Collections.ArrayList Adapter(System.Collections.IList list);
static member Adapter : System.Collections.IList -> System.Collections.ArrayList
Public Shared Function Adapter (list As IList) As ArrayList

Parâmetros

list
IList

O IList embrulho.

Devoluções

O ArrayList invólucro em torno do IList.

Exceções

list é null.

Observações

Adapter não copia o conteúdo de IList. Em vez disso, apenas cria um ArrayList wrapper em torno IListde ; portanto, alterações para o IList também afetam o ArrayList.

A ArrayList classe fornece métodos genéricos Reversee BinarySearchSort métodos. Este wrapper pode ser um meio de usar esses métodos em IList; no entanto, realizar estas operações genéricas através do wrapper pode ser menos eficiente do que operações aplicadas diretamente no IList.

Este método é uma O(1) operação.

Aplica-se a

Ver também