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

定義

建立 GotoExpression,代表指定之 GotoExpressionKind 的跳躍點。Creates a GotoExpression representing a jump of the specified GotoExpressionKind. 也可以指定在跳躍時傳遞至標籤的值。The value passed to the label upon jumping can also be specified.

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 將跳躍的目標 GotoExpressionThe LabelTarget that the GotoExpression will jump to.

value
Expression

將在跳躍時傳遞至關聯標籤的值。The value that will be passed to the associated label upon jumping.

type
Type

要將 Type 屬性設定為與之相等的 TypeAn Type to set the Type property equal to.

傳回

GotoExpression

GotoExpression,其 Kind 等於 kindTarget 屬性設定為 targetType 屬性設定為 type,且包含在跳躍時傳遞至目標標籤的 valueA GotoExpression with Kind equal to kind, the Target property set to target, the Type property set to type, and value to be passed to the target label upon jumping.

適用於