Hi Edward,
Um, could you clarify what you mean?
If you want the original reference to change according to changes
made inside a method referencing a reference variable is very useful.
MyObject mo = new MyObject()
DoStuff(ref mo);
DoMoreStuff(mo);
....
private void DoStuff(ref MyObject m1)
{
if(unsatisfactory)
m1 = new MyObject();
...
}
private void DoOtherStuff(MyObject m2)
{
// m2 would not be the same as m1 without ref
}
On Fri, 12 Nov 2004 12:36:38 -0500, Edward Diener <di****@ORsoftware.com>
wrote:
My undersstanding of using a ref parameter is to be able to pass
initialized
value variables as references. Is there any purpose to using a ref
paraneter
with a reference variable ? If one does it the compiler accepts it. Does
this mean anything ?
--
Happy Coding!
Morten Wennevik [C# MVP]