快速開發平臺CreateList的用法

用CreateList,能夠建立一個List<Object>對象,在平臺中,能夠當數組效果使用,實現數組功能。
代碼以下:html

dim list=CreateList()
list.Add("張三")
list.Add(1)
list.Add("李四")

for each a in list
        msgbox(cstr(a))
next

List經常使用的用法以下:

            '清除全部項
            list.Clear()
            '判斷某個項是否存在於List中
            bool a = list.Contains("張三")
            '項個數
             list.Count
            '移除某一個項
             list.Remove("張三")
             '移除某個位置項目
             list.RemoveAt(1)
             '在某個位置插入一個項目
            list.Insert(1, "李四")
            '排序
             list.Sort()
            '反序
            aaa.Reverse()數組

原文地址;http://bbs.delit.cn/thread-201-1-1.htmlide

轉載請註明出處:spa

撰寫人:度量科技http://www.delit.cnorm

相關文章
相關標籤/搜索