Infer.NET Documentation
Case Method (i, value)
Infer.NET code documentationMicrosoftResearch.Infer.ModelsVariableCase(Variable<(Of <(Int32>)>), Int32)
Microsoft Research, Cambridge
Opens a stochastic case statement, active when the integer argument has the specified value.
Declaration Syntax
C#Visual BasicVisual C++
public static CaseBlock Case(
	Variable<int> i,
	int value
)
Public Shared Function Case ( _
	i As Variable(Of Integer), _
	value As Integer _
) As CaseBlock
public:
static CaseBlock^ Case(
	Variable<int>^ i, 
	int value
)
Parameters
i (Variable<(Of <(Int32>)>))
The condition of the case block
value (Int32)
The value of the condition for which the block is active
Return Value
A CaseBlock object which must be closed before inference is performed.
Remarks
This method should be used as the argument to a using() statement, so that the if statement is automatically closed. If this is not possible, the returned CaseBlock must be closed manually by calling CloseBlock().

Assembly: Infer.Compiler (Module: Infer.Compiler) Version: 2.3.41111.0 (2.3.41111.0)