G
Guest
Hi,
I wrote codes like this:
private structure ST
dim a as string
dim b as integer
end structure
dim arrST as new arraylist
for i as integer = 0 to 5
dim ST1 as ST
ST1.a = today.ToLongTimeString
ST1.b = i
arrST.add(ST1)
next
' the value of ST1.B in arrST will be 0 to 5
for i as integer = 0 to 5
dim ST1 as ST = arrST(i)
ST1.b += 1
next
' the value of ST1.B in arrST still 0 to 5
Can anyone help me, thanks!
I wrote codes like this:
private structure ST
dim a as string
dim b as integer
end structure
dim arrST as new arraylist
for i as integer = 0 to 5
dim ST1 as ST
ST1.a = today.ToLongTimeString
ST1.b = i
arrST.add(ST1)
next
' the value of ST1.B in arrST will be 0 to 5
for i as integer = 0 to 5
dim ST1 as ST = arrST(i)
ST1.b += 1
next
' the value of ST1.B in arrST still 0 to 5
Can anyone help me, thanks!