array question

hi,

i have a class named test

in app properties, i have 2 arrays


dim x(-1) as test
dim y(-1) as test

dim myvar as new test

x.append myvar
y.append myvar 

now x array have one element, y array also

now if remove first item from array x

the first item in array y are also removed !

normal or bug ?

may be a item cannot be in multiple arrays ?

Not here

  dim x(-1) as test
  dim y(-1) as test
  
  dim myvar as new test
  
  x.append myvar
  y.append myvar
  
  x.remove 0
  
  break

X has 0 elements
y has one

post some code ?

Even though your pseudo-code above doesn’t show it, you must have assigned x to y (or y to x) so both variables point to the same array. In that case, you’d see the results you’re seeing.