Share via


StringCollection.IList.Add(Object) 메서드

정의

개체를 StringCollection의 끝 부분에 추가합니다.

 virtual int System.Collections.IList.Add(System::Object ^ value) = System::Collections::IList::Add;
int IList.Add (object value);
int IList.Add (object? value);
abstract member System.Collections.IList.Add : obj -> int
override this.System.Collections.IList.Add : obj -> int
Function Add (value As Object) As Integer Implements IList.Add

매개 변수

value
Object

Object의 끝에 추가할 StringCollection입니다. 값은 null이 될 수 있습니다.

반환

value가 추가된 StringCollection 인덱스입니다.

구현

예외

StringCollection이 읽기 전용인 경우

또는

StringCollection가 고정 크기입니다.

설명

StringCollectionnull 유효한 값으로 허용되고 중복 요소를 허용합니다.

이미 용량과 같으면 Count 내부 배열을 자동으로 재할당하여 의 StringCollection 용량이 증가하고 새 요소가 추가되기 전에 기존 요소가 새 배열에 복사됩니다.

가 용량보다 작은 경우 Count 이 메서드는 O(1) 작업입니다. 새 요소를 수용하기 위해 용량을 늘려야 하는 경우 이 메서드는 O(n) 작업이 되고 여기서 n 는 입니다 Count.

적용 대상

추가 정보