"The Crow" <q> schrieb im Newsbeitrag
news:uf**************@TK2MSFTNGP14.phx.gbl...
code snippet below briefly shows what i need to do :
public void Method1(params object[] args)
{
Method2(args);
}
public void Method2(params object[] args)
{
//Do something.
}
in Method1 i pass all coming parameters to Method2, but i thing it will
call Method2 such a Method2(object[] args)... to be more clear, i would
access parameters in Method2 like args[0][0], args[0][1] ..... how can i
prevent this?
Did you test it?
It should use the normal form of Method2 since it is applicable.
From the spec:
<quote>
The expanded form of a method is available only if the normal form of the
method
is not applicable and only if a method with the same signature as the
expanded form
is not already declared in the same type.
</quote>
To call the expanded form (i.e. to args of Method1 will be the one element
of args in Method2),
you'll have to call:
Method2((object)args);
Christof