Clone and Copy
Clone will copy the structure of a data 
Copy will copy the complete structure and data.
Example:
Difference between Clone() and Copy() method
 string[] arr1 = { "a", "b", "c" }; 
 string[] arr2 = arr1; //copy
 string[] arr3 = (string[])arr1.Clone();
 arr2[0] = "x";
 MessageBox.Show(arr1[0] + "," + arr2[0] + "," + arr3[0]);
luni, 25 august 2014
Abonați-vă la:
Postare comentarii (Atom)

 
Niciun comentariu:
Trimiteți un comentariu