다음을 통해 공유


ArrayList.Adapter 메서드

특정 IList에 대해 ArrayList 래퍼를 만듭니다.

네임스페이스: System.Collections
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public Shared Function Adapter ( _
    list As IList _
) As ArrayList
‘사용 방법
Dim list As IList
Dim returnValue As ArrayList

returnValue = ArrayList.Adapter(list)
public static ArrayList Adapter (
    IList list
)
public:
static ArrayList^ Adapter (
    IList^ list
)
public static ArrayList Adapter (
    IList list
)
public static function Adapter (
    list : IList
) : ArrayList

매개 변수

  • list
    래핑할 IList입니다.

반환 값

IList 주변의 ArrayList 래퍼입니다.

예외

예외 형식 조건

ArgumentNullException

list가 Null 참조(Visual Basic의 경우 Nothing)인 경우

설명

AdapterIList의 내용을 복사하지 않습니다. 대신 IList 주변에 ArrayList 래퍼만 만듭니다. 따라서 IList를 변경하면 ArrayList에도 영향을 미칩니다.

ArrayList 클래스는 일반 Reverse, BinarySearchSort 메서드를 제공합니다. 이 래퍼를 사용하면 IList에 대해 이러한 메서드를 사용할 수 있지만 래퍼를 통해 이러한 일반 작업을 수행하는 것은 IList에 직접 적용된 작업보다 덜 효율적일 수 있습니다.

이 메서드는 O(1) 연산입니다.

버전 호환성

.NET Framework 버전 1.0 및 1.1에서는 ArrayList 래퍼의 GetEnumerator(Int32,Int32) 메서드 오버로드를 호출하면 두 번째 인수를 개수가 아니라 상한으로 처리하는 열거자가 반환되었습니다. .NET Framework 2.0에서는 두 번째 인수가 개수로 올바르게 처리됩니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

ArrayList 클래스
ArrayList 멤버
System.Collections 네임스페이스
IList
BinarySearch
Reverse
Sort