ListBind Method (MemberInfo, ElementInit[])

Expression.ListBind Method (MemberInfo, ElementInit())

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Creates a MemberListBinding where the member is a field or property.

Namespace:  System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

'Declaration
Public Shared Function ListBind ( _
	member As MemberInfo, _
	ParamArray initializers As ElementInit() _
) As MemberListBinding

Parameters

member
Type: System.Reflection.MemberInfo
A MemberInfo that represents a field or property to set the Member property equal to.
initializers
Type: System.Linq.Expressions.ElementInit ()
An array of ElementInit objects to use to populate the Initializers collection.

Return Value

Type: System.Linq.Expressions.MemberListBinding
A MemberListBinding that has the BindingType property equal to ListBinding and the Member and Initializers properties set to the specified values.

ExceptionCondition
ArgumentNullException

member is Nothing.

-or-

One or more elements of initializers are Nothing.

ArgumentException

member does not represent a field or property.

-or-

The FieldType or PropertyType of the field or property that member represents does not implement IEnumerable.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft