System.Linq.Expressions.Error.IncorrectNumberOfConstructorArguments C# (CSharp) Method

IncorrectNumberOfConstructorArguments() static private method

ArgumentException with message like "Incorrect number of arguments for constructor"
static private IncorrectNumberOfConstructorArguments ( ) : Exception
return System.Exception
        internal static Exception IncorrectNumberOfConstructorArguments()
        {
            return Dynamic.Utils.Error.IncorrectNumberOfConstructorArguments();
        }
        /// <summary>

Usage Example

        private static void ValidateArgumentCount(MethodBase method, ExpressionType nodeKind, int count, ParameterInfo[] pis)
        {
            if (pis.Length != count)
            {
                // TODO: this is for LinqV1 compat, can we just have one exception?
                switch (nodeKind)
                {
                case ExpressionType.New:
                    throw Error.IncorrectNumberOfConstructorArguments();

                case ExpressionType.Invoke:
                    throw Error.IncorrectNumberOfLambdaArguments();

                case ExpressionType.Dynamic:
                case ExpressionType.Call:
                    throw Error.IncorrectNumberOfMethodCallArguments(method);

                default:
                    throw Assert.Unreachable;
                }
            }
        }
All Usage Examples Of System.Linq.Expressions.Error::IncorrectNumberOfConstructorArguments
Error