private bool ArgsMatchParamsList(Mono.Collections.Generic.Collection<ParameterDefinition> a, Mono.Collections.Generic.Collection<ParameterDefinition> b)
        {
            if (a.Count == 0 || a.Last().CustomAttributes.All(x => x.AttributeType.FullName != "System.ParamArrayAttribute"))
            {
                if (b.Count == 0 || b.Last().CustomAttributes.All(x => x.AttributeType.FullName != "System.ParamArrayAttribute"))
                {
                    return false;
                }
                else
                {
                    var temp = a;
                    a = b;
                    b = temp;
                }
            }

            int numberOfMatches = 0;
            while (numberOfMatches < a.Count - 1 && numberOfMatches < b.Count)
            {
                if (AreSame(a[numberOfMatches].ParameterType, b[numberOfMatches].ParameterType))
                {
                    numberOfMatches++;
                }
                else
                {
                    break;
                }
            }

            if (numberOfMatches != a.Count - 1)
            {
                return false;
            }

            var paramsArg = a.Last().ParameterType.GetElementType();
            for (int i = a.Count - 1; i < b.Count; i++)
            {
                bool matches = false;
                var type = b[i].ParameterType;
                while (type != null && !matches)
                {
                    if (AreSame(type, paramsArg))
                    {
                        matches = true;
                    }
                    else
                    {
                        type = type.Resolve().BaseType;
                    }
                }

                if (!matches)
                {
                    return false;
                }
            }

            return true;
        }