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 等於 kindTarget 屬性設定為 targetType 屬性設定為 type,且包含在跳躍時傳遞至目標標籤的 value

適用於