Hello, I have two arrays of structures. I define the arrays of structures as follows:-
//initialisation ConfigApp.Config.ConfigCollection[] orgColl; ConfigApp.Config.ConfigCollection[] newColl; where ConfigApp is the namespace, Config is the Class Name and ConfigCollection is the name of the structure, and I have also tried defining the arrays in this way:- ConfigApp.Config.ConfigCollection[] newColl = new ConfigApp.Config.ConfigCollection[2]; I call my Get function to fill orgColl (one of the arrays of structures). When orgColl is returned I copy it to newColl. I have done this using:- orgColl.CopyTo(newColl,0); and I have tried:- newColl = orgColl; Then I pass the collection by reference to a function that makes changes to it, public void MakeChanges(ref ConfigApp.Config.ConfigCollection[] newColl) { //newColl = orgColl; newColl[0].attValue[0] = "newName"; } When I return to the calling function I find that both orgColl and newColl have the value 'newValue' inserted at the point .attValue[0] How can I set up the arrays so that the orgColl's value is not changed when newColl's value is changed. Thankyou for any help, Kerry You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.