Expression.SwitchCase Method (Expression, Expression())

Creates a SwitchCase for use in a SwitchExpression.

Namespace:  System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

'Declaration
Public Shared Function SwitchCase ( _
	body As Expression, _
	ParamArray testValues As Expression() _
) As SwitchCase

Parameters

body
Type: System.Linq.Expressions.Expression
The body of the case.
testValues
Type: System.Linq.Expressions.Expression()
The test values of the case.

Return Value

Type: System.Linq.Expressions.SwitchCase
The created SwitchCase.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: