ArgumentTypeCannotBeVoid() static private method

ArgumentException with message like "Argument type cannot be void"
static private ArgumentTypeCannotBeVoid ( ) : Exception
return System.Exception
        private static void ValidateDynamicArgument(Expression arg, string paramName, int index)
        {
            ExpressionUtils.RequiresCanRead(arg, paramName, index);
            var type = arg.Type;

            ContractUtils.RequiresNotNull(type, nameof(type));
            TypeUtils.ValidateType(type, nameof(type));
            if (type == typeof(void))
            {
                throw Error.ArgumentTypeCannotBeVoid();
            }
        }