国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

ASP數組編碼ArrayList類

2019-11-17 04:13:40
字體:
來源:轉載
供稿:網友

程序代碼
<%
'Written By Shaoyun  Site:www.devjs.com
Class ArrayList
PRivate m_array()
Private m_count
Private Sub Class_Initialize()
    Redim m_array(0)
    m_count=0
End Sub
Private Sub Class_Terminate()
    Redim m_array(0)
    m_count=0
End Sub
Public Property Get Count()
    Count=m_count
End Property
Public Property Get Item(index)
    Item=m_array(index)
End Property
Public Function Add(arrItem)
    Redim Preserve m_array(m_count)
    m_array(m_count)=arrItem
    m_count=m_count+1
End Function
End Class
%>


使用方法如下:

 程序代碼
<%
dim arr : set arr=new ArrayList
arr.add "a" : arr.add "b" : arr.add "c"
Response.Write arr.count & "<br>"
for i=0 to arr.count-1
    Response.Write arr.item(i) & "<br>"
next
set arr=nothing
%>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 望谟县| 阳曲县| 秭归县| 江华| 遵义县| 苍溪县| 成武县| 读书| 瑞金市| 奉新县| 平江县| 石嘴山市| 保德县| 宜州市| 丰县| 北安市| 高尔夫| 庆城县| 安多县| 江口县| 新河县| 庆阳市| 洪洞县| 虞城县| 泽普县| 宁乡县| 大丰市| 濮阳县| 剑河县| 鹤岗市| 洛阳市| 囊谦县| 鲜城| 米泉市| 克拉玛依市| 怀远县| 琼中| 桂林市| 屏东市| 鱼台县| 珲春市|