You don't need any boxing if you have a reference already. You just need to
make the paramater a "ref" param.
....
// the called function:
public void switchReference( ref Hashtable collection)
{
collection = new Hashtable();
}
....
//calling it
....
Hashtable a,b;
a = new Hastable();
b = a;
//now, both a and b referr to the same Hashtable
switchReference(ref a);
//now, b still refers to the original Hashtable, a is a separate one.
"tham" <pa******@hotmail.com> wrote in message
news:0C**********************************@microsof t.com...
HI,
can i box and unbox a reference so that i can achieve a 'pointer to
pointer' effect. i want to pass a reference as a parameter to a function and
then have the function change what the reference is pointing to...
many thanks
tham