Expression.MakeGoto(GotoExpressionKind, LabelTarget, Expression, Type) 方法

定义

创建一个 GotoExpression,它表示指定的 GotoExpressionKind 的跳转。 也可以指定在跳转时传递给标签的值。

public:
 static System::Linq::Expressions::GotoExpression ^ MakeGoto(System::Linq::Expressions::GotoExpressionKind kind, System::Linq::Expressions::LabelTarget ^ target, System::Linq::Expressions::Expression ^ value, Type ^ type);
public static System.Linq.Expressions.GotoExpression MakeGoto (System.Linq.Expressions.GotoExpressionKind kind, System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value, Type type);
public static System.Linq.Expressions.GotoExpression MakeGoto (System.Linq.Expressions.GotoExpressionKind kind, System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression? value, Type type);
static member MakeGoto : System.Linq.Expressions.GotoExpressionKind * System.Linq.Expressions.LabelTarget * System.Linq.Expressions.Expression * Type -> System.Linq.Expressions.GotoExpression
Public Shared Function MakeGoto (kind As GotoExpressionKind, target As LabelTarget, value As Expression, type As Type) As GotoExpression

参数

target
LabelTarget

LabelTarget 将跳至的 GotoExpression

value
Expression

将在跳转时传递给关联标签的值。

type
Type

要将 Type 属性设置为与其相等的 Type

返回

一个 GotoExpression,其 Kind 等于 kind,其 Target 属性设置为 target,并且其 Type 属性设置为 type,此外还有一个在跳转时将传递给目标标签的 value

适用于