2016-12-25 1 views
-3

J'ai un tableau string()() dans lequel il doit être redim pour loop.So Comment puis-je faire cela. Un code comme celui-ci.Comment travailler avec string()()

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

est similaire à: http://stackoverflow.com/questions/16369217/redim-preserve-to-a-multi-dimensional-array-in-visual-basic-6 – techhunter

+0

dans ce lien n en redim a (n) est donné. mais dans mon problème je ne suis pas clair.Si je suis clair, je ne suis pas un problème. –

+0

Je change le mon code.now z en clair. –

Répondre

0

Je trouve que je dois Redim étape arr pas à pas comme ci-dessous:

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