private static object BoxArg(ParameterInfo pinfo, object arg)
{
if (arg == null)
return arg;
Type paramType = pinfo.ParameterType;
//Type argType = arg.GetType();
if (!paramType.IsPrimitive)
return arg;
return Convert.ChangeType(arg, pinfo.ParameterType); // don't know yet what we need here
}