摘自:《pro C#2010 and the .NET 4 Platform》
The golden rule to keep in mind when passing reference types:
• If a reference type is passed by reference, the callee may change the values of the object’s state data as well as the object it is referencing.
• If a reference type is passed by value, the callee may change the values of the object’s state data but not the object it is referencing.
本文摘自《proC#2010andthe.NET4Platform》,详细介绍了C#中引用类型的两种传递方式:按引用传递和按值传递的区别。当按引用传递时,被调用者可以改变对象的状态数据及所指向的对象;而按值传递时,只能改变对象状态但不能改变其指向的对象。
5919

被折叠的 条评论
为什么被折叠?



