Multiple choice

Which of following is/are incorrect about Shallow Cloning in Prototype design pattern in C#?

  1. In Shallow Cloning, the copy of an object copies the elements and everything directly or indirectly referenced by the elements.

  2. In a Shallow copy, it copies all reference types or value types.

  3. In this cloning, only the parent object is cloned.

  4. In this cloning, the references in the new object point to the same objects that the references in the original object points to.

  5. Both (1) and (3).

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Shallow Cloning does not copy the objects that the references refer to. This is only possible in case of deep cloning.