Expression.MemberBind Method

Definition

Creates a MemberMemberBinding that represents the recursive initialization of members of a member.

Overloads

MemberBind(MethodInfo, MemberBinding[])

Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.

MemberBind(MethodInfo, IEnumerable<MemberBinding>)

Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.

MemberBind(MemberInfo, IEnumerable<MemberBinding>)

Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.

MemberBind(MemberInfo, MemberBinding[])

Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.

MemberBind(MethodInfo, MemberBinding[])

Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs

Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.

C#
public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MethodInfo propertyAccessor, params System.Linq.Expressions.MemberBinding[] bindings);

Parameters

propertyAccessor
MethodInfo

The MethodInfo that represents a property accessor method.

bindings
MemberBinding[]

An array of MemberBinding objects to use to populate the Bindings collection.

Returns

A MemberMemberBinding that has the BindingType property equal to MemberBinding, the Member property set to the PropertyInfo that represents the property accessed in propertyAccessor, and Bindings properties set to the specified values.

Exceptions

propertyAccessor or bindings is null.

propertyAccessor does not represent a property accessor method.

-or-

The Member property of an element of bindings does not represent a member of the type of the property accessed by the method that propertyAccessor represents.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

MemberBind(MethodInfo, IEnumerable<MemberBinding>)

Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs

Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.

C#
public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MethodInfo propertyAccessor, System.Collections.Generic.IEnumerable<System.Linq.Expressions.MemberBinding> bindings);

Parameters

propertyAccessor
MethodInfo

The MethodInfo that represents a property accessor method.

bindings
IEnumerable<MemberBinding>

An IEnumerable<T> that contains MemberBinding objects to use to populate the Bindings collection.

Returns

A MemberMemberBinding that has the BindingType property equal to MemberBinding, the Member property set to the PropertyInfo that represents the property accessed in propertyAccessor, and Bindings properties set to the specified values.

Exceptions

propertyAccessor or bindings is null.

propertyAccessor does not represent a property accessor method.

-or-

The Member property of an element of bindings does not represent a member of the type of the property accessed by the method that propertyAccessor represents.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

MemberBind(MemberInfo, IEnumerable<MemberBinding>)

Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs

Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.

C#
public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MemberInfo member, System.Collections.Generic.IEnumerable<System.Linq.Expressions.MemberBinding> bindings);

Parameters

member
MemberInfo

The MemberInfo to set the Member property equal to.

bindings
IEnumerable<MemberBinding>

An IEnumerable<T> that contains MemberBinding objects to use to populate the Bindings collection.

Returns

A MemberMemberBinding that has the BindingType property equal to MemberBinding and the Member and Bindings properties set to the specified values.

Exceptions

member or bindings is null.

member does not represent a field or property.

-or-

The Member property of an element of bindings does not represent a member of the type of the field or property that member represents.

Remarks

The member parameter must represent a field or property.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

MemberBind(MemberInfo, MemberBinding[])

Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs
Source:
MemberMemberBinding.cs

Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.

C#
public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MemberInfo member, params System.Linq.Expressions.MemberBinding[] bindings);

Parameters

member
MemberInfo

The MemberInfo to set the Member property equal to.

bindings
MemberBinding[]

An array of MemberBinding objects to use to populate the Bindings collection.

Returns

A MemberMemberBinding that has the BindingType property equal to MemberBinding and the Member and Bindings properties set to the specified values.

Exceptions

member or bindings is null.

member does not represent a field or property.

-or-

The Member property of an element of bindings does not represent a member of the type of the field or property that member represents.

Remarks

The member parameter must represent a field or property.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0