C#面试题

当前位置: 面试问题网 > C#面试题 > What\'s the difference between deep copy and shallow copy? (深拷贝与浅拷贝有什么区别)

What\'s the difference between deep copy and shallow copy? (深拷贝与浅拷贝有什么区别)

  浅拷贝是指将对象中的数值类型的字段拷贝到新的对象中,而对象中的引用型字段则指复制它的一个引用到目标对象。如果改变目标对象中引用型字段的值他将反映在原是对象中,也就是说原始对象中对应的字段也会发生变化。深拷贝与浅拷贝不同的是对于引用的处理,深拷贝将会在新对象中创建一个新的和原是对象中对应字段相同(内容相同)的字段,也就是说这个引用和原是对象的引用是不同的,我们在改变新对象中的这个字段的时候是不会影响到原始对象中对应字段的内容

【What\'s the difference between deep copy and shallow copy? (深拷贝与浅拷贝有什么区别)】相关文章

1. What\'s the difference between deep copy and shallow copy? (深拷贝与浅拷贝有什么区别)

2. 软件测试LoadRunner面试题:What is the difference between standard log and extended log?

3. 软件测试LoadRunner面试题:What is correlation? Explain the difference between automatic correlation and manu

4. What\'s the difference between Debug and Trace class? (Debug类与Trace类有什么区别)

5. What\'s the difference between an interface and abstract class? (接口与抽象类有什么区别)

6. 软件测试LoadRunner面试题:What is the difference between Overlay graph and Correlate graph?

7. 软件测试LoadRunner面试题:If web server, database and Network are all fine where could be the problem?

8. what is the difference between ext2 and ext3

9. shallow copy和deep copy的区别

10. 软件测试LoadRunner面试题:How did you plan the Load? What are the Criteria?

本文来源:https://www.mianshiwenti.com/a13050.html

点击展开全部

《What\'s the difference between deep copy and shallow copy? (深拷贝与浅拷贝有什么区别)》

将本文的Word文档下载到电脑,方便收藏和打印

推荐程度:

进入下载页面

﹝What\'s the difference between deep copy and shallow copy? (深拷贝与浅拷贝有什么区别)﹞相关内容

其它栏目

也许您还喜欢