This documentation is archived and is not being maintained.

Expression.ListInit Method

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member ListInit(NewExpression, IEnumerable<ElementInit>) Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.
Public method Static member ListInit(NewExpression, IEnumerable<Expression>) Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.
Public method Static member ListInit(NewExpression, ElementInit[]) Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.
Public method Static member ListInit(NewExpression, Expression[]) Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.
Public method Static member ListInit(NewExpression, MethodInfo, IEnumerable<Expression>) Creates a ListInitExpression that uses a specified method to add elements to a collection.
Public method Static member ListInit(NewExpression, MethodInfo, Expression[]) Creates a ListInitExpression that uses a specified method to add elements to a collection.
Top
Show: