Click or drag to resize
VariableEnumToIntTEnum Method
Microsoft Research
Creates a random int variable corresponding to a random enum variable. The returned variable can be used as the condition for a Switch or Case block.

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.7.1803.2803 (2.7.1803.2803)
Syntax
public static Variable<int> EnumToInt<TEnum>(
	Variable<TEnum> enumVar
)

Parameters

enumVar
Type: MicrosoftResearch.Infer.ModelsVariableTEnum
The enum variable

Type Parameters

TEnum
The enum type

Return Value

Type: VariableInt32
An integer random variable
See Also