Expression.ListBind Method (MemberInfo, IEnumerable(Of ElementInit))
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Creates a MemberListBinding where the member is a field or property.
Assembly: System.Core (in System.Core.dll)
'Declaration 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.MemberListBindingA 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 Nothing. -or- One or more elements of initializers are Nothing. |
| 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. |
Show: