public static ElementInit ElementInit(MethodInfo addMethod, params Expression[] arguments) { return ElementInit(addMethod, arguments as IEnumerable<Expression>); }
public void ListInit() { var expression = LinqExpression.ListInit( LinqExpression.New( typeof(List <long>)), LinqExpression.ElementInit( typeof(List <long>).GetMethod("Add"), LinqExpression.Constant(0L))); ShouldRoundrip(expression); }