K
Ken
Objects are reference types.
When i pass an object as a parameter to a method, in Java
this automatically means I am passing a reference of that
Object, not a copy of it.
In C#, this means the same, except there is the 'ref'
keyword which explicitly tells the C# compiler to act on
the actual reference passed as a parameter.
Therefore I really do not see a situation where the
compiler does not know how is the parameter to be treated.
How can therefore tha ref keyword be useful to the
progeammer?
Thanks,
Ken
When i pass an object as a parameter to a method, in Java
this automatically means I am passing a reference of that
Object, not a copy of it.
In C#, this means the same, except there is the 'ref'
keyword which explicitly tells the C# compiler to act on
the actual reference passed as a parameter.
Therefore I really do not see a situation where the
compiler does not know how is the parameter to be treated.
How can therefore tha ref keyword be useful to the
progeammer?
Thanks,
Ken