Difference Between Shallow Copy and Deep Copy In C# With Example

Difference Between Shallow Copy and Deep Copy In C# With Example

IT Knowledge

2 года назад

1,106 Просмотров

In shallow copy we clone or copy the object data of first level object not nested object. Nested object or second level object only copy reference.
If nested or second level object value change it will also change the original object second level value.

In deep copy we clone or copy the first and second level object data. If nested or second level object value change it will not change the original object second level value.

Тэги:

#shallow_copy #deep_copy #c#
Ссылки и html тэги не поддерживаются


Комментарии:

Sinkarq
Sinkarq - 20.02.2022 10:46

Very good tutorial

Ответить