private static bool IsCongruent(ParameterInfo[] pinfos, object[] args)
{
bool ret = false;
if (args == null)
return pinfos.Length == 0;
if (pinfos.Length == args.Length)
{
ret = true;
for (int i = 0; ret && i < pinfos.Length; i++)
{
object arg = args[i];
Type argType = (arg == null ? null : arg.GetType());
Type paramType = pinfos[i].ParameterType;
ret = ParamArgTypeMatch(paramType, argType);
}
}
return ret;
}