KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a typed array MyType[] types; and i want to make and independant copy of this array. i tried this MyType[] types2 = new MyType[types.Length] ; types2 = types ; but this create a reference to the first. I then tried Array.Copy( types , types2 , types.Length ) ; but I have the same problem: changing a value in the first array changes the value in the copy as well. How can I make a completely independent or deep copy of an Array, IList or IEnumerable?
Tags (comma-separated)
Save Edits
Cancel