I have a problem with switch
. The user can select one of few options. Then based on the user's choice, I have to change a variable type.
var train = new Propagation();
switch (alghoritm)
{
case 1:
train = OtherPropagation();
case 2:
train = OtherPropagation2();
case 3:
train = OtherPropagation3();
default:
train = Propagation();
}
C# has static variable types, so it's impossible for me to change it, but based on choice, the rest code works diffrently.
Do you have any ideas?
Thanks for your help!