+ //
+ // So far, the params attribute can be used in C# for the last
+ // and next to last method parameters.
+ // If some other language can place it anywhere we will
+ // have to analyze all parameters and not just last 2.
+ //
+ --count;
+ for (int i = count; i >= 0 && i > count - 2; --i) {
+ if (!pi [i].ParameterType.IsArray)
+ continue;
+
+ object [] attrs = pi [i].GetCustomAttributes (TypeManager.param_array_type, true);
+ if (attrs.Length == 1) {
+ params_idx = i;
+ return;
+ }
+ }
+ }