Noob problem.....
I'm completely new to C# and OOP in general (yes, I'm a mainframer) so forgive me if this question makes no sense.
I've written a program that has an array of objects.
I pass this array to a method and immediately create a new instance of the array and copy the passed array into the new instance. I then make changes to the copy and when finished, try to copy the original, passed array back into the new instance. This is where I run into a problem: both versions have been changed, even though I only worked on the copy. I understand that this is probably something to do with the arrays being ref types by default, but how do I create a unique copy? (or am I completely missing the real problem?)
rlsuthPosted Mar 4, 2005, 2:12 AM
yasser_8227Posted Mar 4, 2005, 1:36 AM
rlsuthPosted Mar 4, 2005, 1:21 AM
rlsuthPosted Mar 4, 2005, 12:41 AM
yasser_8227Posted Mar 4, 2005, 12:01 AM