المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : passing reference types by reference



C# Programming
09-19-2009, 06:55 PM
In C++ I can pass parameters by value/reference(using &).

If I create an instance of a class using the new keyword in C++, and pass the pointer pointing to it by reference (reference to pointer, e.g. MyClass &* ptr), is it the same as passing a ref type by ref in C#?

As in both cases, the callee can change the object’s state, as well as point/refer to other objects.

What do you think?