Copyable: A framework for copying or cloning .NET objects

Copyable is a small framework for copying (or cloning, if you will) virtually any .NET object. It copies many objects automatically, and contains additional functionality for cases where it cannot automatically perform the copying. A detailed explanation and walkthrough is given in my post on Copyable.

Copyable is released under the MIT license. Download Copyable from here (binary) or here (source). The latest version is

  • suhas

    hi, is it possible for me to preserve the MIT-License for this code? if yes, what is the procedure..

    Regards, joyous suhas

  • Håvard

    If by preserve you mean use the code under the license, you don’t need to do anything but follow the requirements of the license.

    The MIT license for Copyable can be found at

  • suhas

    hi Mr. Havard,

    Thanks for quick and fruitfull reply.

    Regards, Joyous Suhas

  • Simon

    Would you consider extending the code to be able to add a custom attribute onto certain properties to mark them so they are ignored by the deep cloned and instead retain the reference. Thus achieving a mix of deep and shallow.


  • Pingback: .NET 对象深层克隆开源框架 | 哈哈808,开心呵呵网()

  • Rajeev Tyagi

    Hi There, I use OX.Copyable for Deep Clone and here is my code snipet Product prd = (Product)ObjectExtensions.Copy(obj); return prd; and i got the error : ” A first chance exception of type ‘System.ArgumentException’ occurred in mscorlib.dll

    Additional information: An item with the same key has already been added.” Please help me why i get this error.

  • Håvard

    Rajeev: First of all, just use obj.Copy(); instead. Second, it sounds like you’re experiencing an old bug. Are you using the latest source from Github?

  • colonel32

    I’ve emailed in a patch implementing this :)

  • Pingback: What is a Deep and Shallow copy of an object? « ReflectWorks()

  • Pingback: Object Cloning | Pearltrees()