首页 > Windows开发 > 详细

C# - Passing Reference-Type Parameters

时间:2017-04-24 15:16:22      阅读:220      评论:0      收藏:0      [点我收藏+]
A variable of a reference type does not contain its data directly; it contains a reference to its data. When you pass a reference-type parameter by value, it is possible to change the data pointed to by the reference, such as the value of a class member. However, you cannot change the value of the reference itself; that is, you cannot use the same reference to allocate memory for a new class and have it persist outside the block. To do that, pass the parameter using the ref or out keyword.

C# - Passing Reference-Type Parameters

原文:http://www.cnblogs.com/liguangsunls/p/6756862.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!