Remove 메소드

ArrayList 객체에서 특정 요소의 첫번째 발생을 제거합니다.

구문

Object.Remove(Element)

인수:

  • Object: 필수. 항상 ArrayList 객체의 이름입니다.

  • Element: 필수. ArrayList 객체에서 제거할 요소입니다.

주석

다음 예에서는 Remove 메소드의 사용을 보여 줍니다.

예 1:

'Create ArrayList Object
Dim Obj
Set Obj = CreateObject("System.Collections.ArrayList")

'Add Elements to the end of ArrayList Object
Dim Index
Index = Obj.Add(10)
Index = Obj.Add(40)
Index = Obj.Add(20)
Index = Obj.Add(30)

'Output: Obj contains 10, 40, 20, 30

'Remove Element from the ArrayList Object
Obj.Remove(20)
'Output: Obj contains 10, 40, 30