Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 559 Bytes

README.md

File metadata and controls

8 lines (5 loc) · 559 Bytes

Shallow and Deep Copy in .Net

The purpose of this repository is to demonstrate the difference between shallow and deep copy in .Net, how would you implement each one, and when would you use one over the other.

The solution contains 2 projects:

1-ShallowAndDeepCopy provides a custom class that implements the ShallowCopy and DeepCopy methods. This class is used as a demo in the 2nd project.

2-Tests uses the 1st project to demonstrate how each copy method is different from the other and helps decide which type of copy to use in a production scenario.