DelphiBasics
  Home  |  Delphi .net Home  |  System NameSpace
 .NET Framework
 Namespace References

 System
 
  Array  Class 
  Boolean  Structure 
  Buffer  Class 
  Byte  Structure 
  Char  Structure 
  Console  Class 
  Convert  Class 
  DateTime  Structure 
  DayOfWeek  Enumeration 
  Decimal  Structure 
  Double  Structure 
  Enum  Class 
  Environment  Class 
  Exception  Class 
  ICloneable  Interface 
  Int16  Structure 
  Int32  Structure 
  Int64  Structure 
  Math  Class 
  Object  Class 
  OperatingSystem  Class 
  Random  Class 
  SByte  Structure 
  Single  Structure 
  String  Class 
  TimeSpan  Structure 
  UInt16  Structure 
  UInt32  Structure 
  UInt64  Structure 
  Version  Class 
 System.Collections
 System.Globalization
 System.IO

 Articles and Tutorials

 Overview of .NET
 Delphi and .NET
 Winform Applications
 ASP .Net Applications
 php Web Services
 Framework Collections
 Framework String Handling
 Framework Files and Folders


 
 
  System.ICloneable Interface
 
 Description
Cloning is the process of making a new object instance (rather than reference to an existing instance) that contains a clone of the contents of the original object instance.
 
The ICloneable interface provides just the Clone method that must be implemented.
 
In general, cloning has two forms :
 
Shallow Top level objects are copied in value, lower levels by reference
Deep All objects are copied in value

 
It is entirely up to the discretion of the implementing class as to which approach they take. For example, the Array Clone method is a shallow copy.
 
Be wary about shallow copies - updating lower level objects affects both the current (cloned) and original objects.

 Delphi Basics links
 
System.Array
System.Collections.ArrayList
System.Collections.BitArray
System.Collections.Queue
System.Collections.SortedList
System.Collections.Stack
System.String

 Microsoft MSDN links
 
System
System.icloneable
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page