NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ArrayList.Adapter

Creates an ArrayList wrapper for a specific IList.

[Visual Basic]
Public Shared Function Adapter( _
   ByVal list As IList _
) As ArrayList
[C#]
public static ArrayList Adapter(
   IList list
);
[C++]
public: static ArrayList* Adapter(
   IList* list
);
[JScript]
public static function Adapter(
   list : IList
) : ArrayList;

Parameters

list
The IList to wrap.

Return Value

The ArrayList wrapper around the IList.

Exceptions

Exception Type Condition
ArgumentNullException list is a null reference (in Visual Basic Nothing).

Remarks

Adapter does not copy the contents of IList. Instead, it simply creates an ArrayList wrapper around IList; therefore, any changes made to IList also affect the ArrayList.

The ArrayList class provides generic Reverse, BinarySearch and Sort methods. This wrapper can be a vehicle to use those methods on IList. However, the performance of these generic operations through the wrapper may not be as good as operations applied directly on the IList.

See Also

ArrayList Class | ArrayList Members | System.Collections Namespace | IList | BinarySearch | Reverse | Sort