GetArgument() public method

Gets the argument expression with the specified index.
public GetArgument ( int index ) : Expression
index int The index of the argument expression to get.
return Expression
        protected override ElementInit VisitElementInit(ElementInit initializer)
        {
            Out(initializer.AddMethod.ToString());
            string sep = ", ";

            Out('(');
            for (int i = 0, n = initializer.ArgumentCount; i < n; i++)
            {
                if (i > 0)
                {
                    Out(sep);
                }
                Visit(initializer.GetArgument(i));
            }
            Out(')');
            return(initializer);
        }
Beispiel #2
0
        protected override ElementInit VisitElementInit(ElementInit node)
        {
            Out(node.AddMethod.ToString());
            Out('(');
            for (int i = 0, n = node.ArgumentCount; i < n; i++)
            {
                if (i > 0)
                {
                    Out(", ");
                }

                Visit(node.GetArgument(i));
            }

            Out(')');
            return(node);
        }