zhaoyao
10/30/2002 1:33:00 PM
Hi Mark,
You could do something like....
moses.
--------------------------------------------------------------
public void test(params object[] list)
{
for ( int i = 0 ; i < list.Length ; i++ )
Console.WriteLine((object)list[i]);
}
"Mark Belfer" <mark@belfer.net> wrote in message
news:272901c27fb3$8ce92b80$95e62ecf@tkmsftngxs02...
> Hi,
>
> Does anyone know how to iterate through parameters and get
> the values for them with in the method call.
>
> I want to do something like that:
>
> void test(string param1, int param2, ....)
> {
> for(int i=0; i < Params.Length; i++)
> {
> string paramName = Params[i].Name;
> Object paramValue = Params[i].Value;
> }
> }
>
>
> Thanks
> Mark
>