#INCLUDE ONCE "Afx/CCLRHost.inc"
USING Afx
DIM pDisp AS CObject = pCLRHost.CreateInstance("mscorlib" ,"System.Collections.ArrayList")'創建mscorlib庫的ArrayList類
pDisp.Run("Add" ,"First")'調用Add方法寫入First參數
pDisp.Run("Add" ,"Second")
pDisp.Run("Add" ,"Third")
For i As Integer =0 To 2
Debug.Print pDisp.Get("Item",i).ToString'打印所有列表內容
Next