System.Data.ExprException.FunctionArgumentCount C# (CSharp) Метод

FunctionArgumentCount() публичный статический Метод

public static FunctionArgumentCount ( string name ) : Exception
name string
Результат System.Exception
        public static Exception FunctionArgumentCount(string name)
        {
            return _Eval(SR.Format(SR.Expr_FunctionArgumentCount, name));
        }

Usage Example

Пример #1
0
        internal override void Bind(DataTable table, ArrayList list)
        {
            this.Check();

            // special case for the Convert function bind only the first argument:
            // the second argument should be a COM+ data Type stored as a name node, replace it with constant.
            if (funcs[info].id == FunctionId.Convert)
            {
                if (argumentCount != 2)
                {
                    throw ExprException.FunctionArgumentCount(this.name);
                }
                arguments[0].Bind(table, list);

                if (arguments[1].GetType() == typeof(NameNode))
                {
                    NameNode type = (NameNode)arguments[1];
                    arguments[1] = new ConstNode(ValueType.Str, type.name);
                }
                arguments[1].Bind(table, list);
            }
            else
            {
                for (int i = 0; i < argumentCount; i++)
                {
                    arguments[i].Bind(table, list);
                }
            }
        }
All Usage Examples Of System.Data.ExprException::FunctionArgumentCount