Expression.MakeDynamic Method

Definition

Creates a DynamicExpression that represents a dynamic operation.

Overloads

MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression, Expression)

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and four arguments.

MakeDynamic(Type, CallSiteBinder, Expression, Expression)

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and two arguments.

MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression)

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and three arguments.

MakeDynamic(Type, CallSiteBinder, Expression)

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and one argument.

MakeDynamic(Type, CallSiteBinder, IEnumerable<Expression>)

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

MakeDynamic(Type, CallSiteBinder, Expression[])

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression, Expression)

Source:
Expression.cs
Source:
Expression.cs
Source:
Expression.cs

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and four arguments.

C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3);

Parameters

delegateType
Type

The type of the delegate used by the CallSite.

binder
CallSiteBinder

The runtime binder for the dynamic operation.

arg0
Expression

The first argument to the dynamic operation.

arg1
Expression

The second argument to the dynamic operation.

arg2
Expression

The third argument to the dynamic operation.

arg3
Expression

The fourth argument to the dynamic operation.

Returns

A DynamicExpression that has NodeType equal to Dynamic and has the DelegateType, Binder, and Arguments set to the specified values.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0, 2.1

MakeDynamic(Type, CallSiteBinder, Expression, Expression)

Source:
Expression.cs
Source:
Expression.cs
Source:
Expression.cs

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and two arguments.

C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1);

Parameters

delegateType
Type

The type of the delegate used by the CallSite.

binder
CallSiteBinder

The runtime binder for the dynamic operation.

arg0
Expression

The first argument to the dynamic operation.

arg1
Expression

The second argument to the dynamic operation.

Returns

A DynamicExpression that has NodeType equal to Dynamic and has the DelegateType, Binder, and Arguments set to the specified values.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0, 2.1

MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression)

Source:
Expression.cs
Source:
Expression.cs
Source:
Expression.cs

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and three arguments.

C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2);

Parameters

delegateType
Type

The type of the delegate used by the CallSite.

binder
CallSiteBinder

The runtime binder for the dynamic operation.

arg0
Expression

The first argument to the dynamic operation.

arg1
Expression

The second argument to the dynamic operation.

arg2
Expression

The third argument to the dynamic operation.

Returns

A DynamicExpression that has NodeType equal to Dynamic and has the DelegateType, Binder, and Arguments set to the specified values.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0, 2.1

MakeDynamic(Type, CallSiteBinder, Expression)

Source:
Expression.cs
Source:
Expression.cs
Source:
Expression.cs

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and one argument.

C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0);

Parameters

delegateType
Type

The type of the delegate used by the CallSite.

binder
CallSiteBinder

The runtime binder for the dynamic operation.

arg0
Expression

The argument to the dynamic operation.

Returns

A DynamicExpression that has NodeType equal to Dynamic and has the DelegateType, Binder, and Arguments set to the specified values.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0, 2.1

MakeDynamic(Type, CallSiteBinder, IEnumerable<Expression>)

Source:
Expression.cs
Source:
Expression.cs
Source:
Expression.cs

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression>? arguments);
C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> arguments);

Parameters

delegateType
Type

The type of the delegate used by the CallSite.

binder
CallSiteBinder

The runtime binder for the dynamic operation.

arguments
IEnumerable<Expression>

The arguments to the dynamic operation.

Returns

A DynamicExpression that has NodeType equal to Dynamic and has the DelegateType, Binder, and Arguments set to the specified values.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0, 2.1

MakeDynamic(Type, CallSiteBinder, Expression[])

Source:
Expression.cs
Source:
Expression.cs
Source:
Expression.cs

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, params System.Linq.Expressions.Expression[]? arguments);
C#
public static System.Linq.Expressions.DynamicExpression MakeDynamic(Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, params System.Linq.Expressions.Expression[] arguments);

Parameters

delegateType
Type

The type of the delegate used by the CallSite.

binder
CallSiteBinder

The runtime binder for the dynamic operation.

arguments
Expression[]

The arguments to the dynamic operation.

Returns

A DynamicExpression that has NodeType equal to Dynamic and has the DelegateType, Binder, and Arguments set to the specified values.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0, 2.1