#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