Freigeben über


Expression.ListBind Method (MemberInfo, array<ElementInit[])

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Public Shared Function ListBind ( _
    member As MemberInfo, _
    ParamArray initializers As ElementInit() _
) As MemberListBinding
public static MemberListBinding ListBind(
    MemberInfo member,
    params ElementInit[] initializers
)

Parameters

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.

Exceptions

Exception Condition
ArgumentNullException

member is nulla null reference (Nothing in Visual Basic).

-or-

One or more elements of initializers are nulla null reference (Nothing in Visual Basic).

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.

Version Information

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

Platforms

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