TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rlsuth
NA
9
0
Noob problem.....
Mar 3 2005 10:29 PM
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?)
Reply
Answers (
5
)
Novice wishes to clear all members in an Arraylist
How to adjust our application to different resolutions?