Using reflection on a method definition I would like to find out if the original method was defined with 'params' on the last parameter. So can I discover if the original definition was this...
public void MyMethod(int x, params object[] args);
...and not this...
public void MyMethod(int x, object[] args);
My code has a list of arguments and is using reflection to call an arbitrary method. If it is marked with 'params' then I want to package up the extra parameters into an object[] and call the method. If the argument is not marked with 'params' then I would indicate an error instead. So I want to provide the same semantics as C#.
But I cannot find any docs that indicate how to discover this using reflection.