开发者

What is mean by reference in .net wrt CLR (managing objects)?

开发者 https://www.devze.com 2022-12-20 20:52 出处:网络
What开发者_运维知识库 is mean by reference in .net wrt CLR (managing objects)?If you don\'t want to think in terms of C++ pointers, then it means that if you pass an object to a method by reference, t

What开发者_运维知识库 is mean by reference in .net wrt CLR (managing objects)?


If you don't want to think in terms of C++ pointers, then it means that if you pass an object to a method by reference, then the method can modify the original object. If you pass it by value, then the method gets a copy of the object and can't modify the original.


That means only pointer to an object is passed, not the whole object...

0

精彩评论

暂无评论...
验证码 换一张
取 消