16,555
社区成员
发帖
与我相关
我的任务
分享
function counta()
dim a() as integer
dim i as integer
dim table as datatablereader
sql = select * from XX
...
redim a(table.rowcount) //如果我下次再调用这个函数的时候a()数组被重新定义了,我的数据就没有了吧
for i=0 to table.rowcount
...
a(i) = a(i) +1 //a(i)的值我要保留的。下次调用后继续累加的。
...
next i
end function
function counta()
dim a as new arraylist()
dim i as integer
dim table as datatablereader
sql = select * from XX
...
for i=0 to table.rowcount
...
a.add(i) = a(i) + 1
next i
end function
dim data as string = "1234556"
dim a as integer
a = data.indexof("4") //为什么我搜索4的位置的时候,结果是0呢