Boolean Multiplier;
double Number;
double Value;
string Text;
Text = (Value * (1 + (Convert.ToInt32(Multiplier) / 2)).ToString(".0##");
This is the current code I have abstracted down to the general behaviour with the intended behaviour of Value being multiplied by 1.5 if Multiplier is true and Value staying the same if Multiplier is false.
However, this someone does not work although it worked without the division and I think it has to do with floats not being displayed correctly. So I wanted to ask wether I can use something like enums where I have two values and one of them gets chosen dependant on wether the boolean is true or false. Other ways are appreciated as well as advice on formatting decimal numbers on the side as I'm pretty new. If this is documented somewhere already, then I'm sorry but I did not found it :(