ArrayList member assignment

BenH

New member
Joined
Aug 26, 2005
Messages
2
Location
Olympia, WA
Programming Experience
1-3
Hello,

I have a class that has a member of type ArrayList. My question is when I am writing the set property should I just assign the value passed in to it or should I copy each element of the array to the memebr array.

Ex:
VB.NET:
Public Class MyClass
...
  Private m_anArray as ArrayList

...

Set(ByVal value as ArrayList)
  m_anArray = value

...

'''OR''''

Set(ByVal value as ArrayList)
  
  Dim i as integer

  for i=0 to value.count-1
	 m_anArray.Add(value(i))
  next

....

''''OR'''''
'Some other better way ;-)


Thanks,

Ben
 
Back
Top