Expression.ElementInit Method (MethodInfo, Expression)
Creates an ElementInit, given an array of values as the second argument.
Assembly: System.Core (in System.Core.dll)
static member ElementInit : addMethod:MethodInfo * [<ParamArrayAttribute>] arguments:Expression -> ElementInit
addMethod or arguments is null.
The method that addMethod represents is not named "Add" (case insensitive).
The method that addMethod represents is not an instance method.
arguments does not contain the same number of elements as the number of parameters for the method that addMethod represents.
The Type property of one or more elements of arguments is not assignable to the type of the corresponding parameter of the method that addMethod represents.
The addMethod parameter must represent an instance method named "Add" (case insensitive). The add method must have the same number of parameters as the number of elements in arguments. The Type property of each element in arguments must be assignable to the type of the corresponding parameter of the add method, possibly after quoting.
Available since 8
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1