The Labs \ Source Viewer \ SSCLI \ System \ ICloneable

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Class:  ICloneable
  18. **
  19. ** This interface is implemented by classes that support cloning.
  20. **
  21. ===========================================================*/
  22. namespace System
  23. {
  24.    
  25.     using System;
  26.     // Defines an interface indicating that an object may be cloned. Only objects
  27.     // that implement ICloneable may be cloned. The interface defines a single
  28.     // method which is called to create a clone of the object. Object defines a method
  29.     // MemberwiseClone to support default clone operations.
  30.     //
  31.     [System.Runtime.InteropServices.ComVisible(true)]
  32.     public interface ICloneable
  33.     {
  34.         // Interface does not need to be marked with the serializable attribute
  35.         // Make a new object which is a copy of the object instanced. This object may be either
  36.         // deep copy or a shallow copy depending on the implementation of clone. The default
  37.         // Object support for clone does a shallow copy.
  38.         //
  39.         object Clone();
  40.     }
  41. }

Developer Fusion