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
參數
- kind
- GotoExpressionKind
GotoExpressionKind 的 GotoExpression。The GotoExpressionKind of the GotoExpression.
- target
- LabelTarget
LabelTarget 將跳躍的目標 GotoExpression。The LabelTarget that the GotoExpression will jump to.
- value
- Expression
將在跳躍時傳遞至關聯標籤的值。The value that will be passed to the associated label upon jumping.
傳回
GotoExpression,其 Kind 等於 kind
、Target 屬性設定為 target
、Type 屬性設定為 type
,且包含在跳躍時傳遞至目標標籤的 value
。A 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.