Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Expression::ListBind Method (MemberInfo^, array<ElementInit^>^)

 

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

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

public:
static MemberListBinding^ ListBind(
	MemberInfo^ member,
	... array<ElementInit^>^ initializers
)

Parameters

member
Type: System.Reflection::MemberInfo^

A MemberInfo that represents a field or property to set the Member property equal to.

initializers
Type: array<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.

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:
© 2017 Microsoft