2016-12-25 79 views
-3

我有一个字符串()()数组,它必须在循环中redim.So我怎么能这样做。 这样的代码。如何使用字符串()()

dim arr as string()()=nothing 
dim z as integer=nothing 
for i= 1 to 5 
    for j=0 to 536 
     if j mod i =0 then 
      redim preserve arr(z)(i)=i.tostring 
      z+=1 
     end if 
    next 
next 
+0

它类似于:在这个环节http://stackoverflow.com/questions/16369217/redim-preserve-to-a-multi-dimensional-array-in-visual-basic-6 – techhunter

+0

n给出了redim a(n)。但在我的问题我不清楚。如果我清楚,我不是问题。 –

+0

我改变我的code.now z不清楚。 –

回答

0

我发现,我也要一步一步像下面REDIM ARR步:

redim arr(z) 
redim arr(z)(i)