本文介绍了已经引用变量时使用'ref'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 如果对象已经是引用变量,将对象传递给带有'ref'' 关键字的方法会有什么危害吗?如果没有,是否有任何好处?Is there any harm in passing an object into a method with the ''ref''keyword if the object is already a reference variable? If not, isthere any benefit?推荐答案 这是对象的默认值。That is the default for objects. 这是对象的默认设置。 That is the default for objects. 其实是默认的(对于一切)是* by-value *传递。见 < http://www.yoda.arachsys.com/csharp/parameters.html> ;.Actually the default (for everything) is *by-value* passing. See<http://www.yoda.arachsys.com/csharp/parameters.html>. 这篇关于已经引用变量时使用'ref'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-03 14:32