Source Code for http://marcinjuraszek.com blog posts and other code-related activities.
CloneExtension class which gives you
Clone<T>(this T source) extension method. Clone is performed using standard field and/or properties values assignments. Correct assignment code is created on runtime before extension
is used for the first time for given time type
T using Reflection and Expression Tree.
Related StackOverflow question:
How can I clone a class with all the values that are already set in it?