ListBind Method (MemberInfo, IEnumerable(ElementInit))

Expression.ListBind Method (MemberInfo, IEnumerable(Of ElementInit))

 

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

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

Public Shared Function ListBind (
	member As MemberInfo,
	initializers As IEnumerable(Of 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.Collections.Generic.IEnumerable(Of ElementInit)

An IEnumerable(Of T) that contains 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.

Exception Condition
ArgumentNullException

member is null.

-or-

One or more elements of initializers are null.

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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft