I am trying to create a enum as a user input to allow the user to select an option which would switch an integer value. The below code prints "1", regardless of which value (NQ or ES) is selected. I'm not sure where I have it wrong here.
switch (asset)
{
case AssetName.ES:
{
x = 1;
break;
}
case AssetName.NQ:
{
x = 2;
break;
}
}
Print(x);
[Display(Name = "Ticker", GroupName="Inputs")]
public AssetName Asset
{
get { return asset; }
set { asset = asset; }
}
public enum AssetName
{
ES,
NQ
}

Comment