Hi Guys
NP144 Shallow copy / Deep copy
http://en.csharp-online.net/Glossary:Definition_-_Deep_copy
In the Above website there is a definition for Shallow copy and Deep copy.
In this definition what is meant by instance variables and reference variables
Please explain.
Thank you
AlanPosted Sep 9, 2008, 8:46 AM
In the context of the article, 'instance variables' are intended to mean instance fields which are value types and therefore contain their data directly.
'reference variables' mean instance fields which are reference types and which therefore contain a reference to where the data is stored.
Instance fields are, of course, any fields of the type in question which are not static.
The terms used in the article are poor terminology, IMO, and I would stick to the ones which I've used above.
Posted Sep 9, 2008, 8:54 AM
Thank you for your explanation, Alan.