Mid From PDF GoF Patterns Gang of Four Patterns

Deep vs. Shallow Cloning:?

  • The example above demonstrates shallow cloning, where only the primitive

properties are copied. If the object contains references to other objects (e.g.,

arrays, lists), you may need to implement deep cloning to ensure that

referenced objects are also cloned, not just referenced.

More from Design Patterns in C#

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details