I have to convert a number from a string to double, but it should be a max of 15. This is my code to do this at the moment:
var num = double.Parse(stringNum, CultureInfo.InvariantCulture);
num = num <= 15 ? num : 15;
Is there a way to do this in a single expression?
Do it like this: