国产探花免费观看_亚洲丰满少妇自慰呻吟_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
%>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 梁平县| 上思县| 方城县| 鄂尔多斯市| 资溪县| 张家川| 红桥区| 宝兴县| 乌兰县| 华坪县| 东丽区| 河间市| 连城县| 岳阳市| 平果县| 彭泽县| 平远县| 兰考县| 宁海县| 准格尔旗| 成武县| 海门市| 哈巴河县| 乌兰浩特市| 三都| 桂林市| 观塘区| 青岛市| 隆化县| 宁河县| 通化市| 广昌县| 苏州市| 疏勒县| 山阳县| 宜州市| 岐山县| 涡阳县| 清新县| 迁安市| 武川县|