Export (0) Print
Expand All

Expression.ListBind Method (MemberInfo, IEnumerable<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,
	IEnumerable<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: System.Collections.Generic.IEnumerable<ElementInit>
An IEnumerable<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.

ExceptionCondition
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.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2014 Microsoft