Expression::ListBind Method (MemberInfo^, array<ElementInit^>^)
.NET Framework (current version)
Creates a MemberListBinding where the member is a field or property.
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
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
Show: