This is a complex subject with lots of possible solutions and many pros and cons to each. There is a wonderful article here that outlines several different ways of making a copy in C#. To summarize:
-
Clone Manually
Tedious, but high level of control. -
Clone with MemberwiseClone
Only creates a shallow copy, i.e. for reference-type fields the original object and its clone refer to the same object. -
Clone with Reflection
Shallow copy by default, can be re-written to do deep copy. Advantage: automated. Disadvantage: reflection is slow. -
Clone with Serialization
Easy, automated. Give up some control and serialization is slowest of all. -
Clone with IL, Clone with Extension Methods
More advanced solutions, not as common.