I'm trying to round a result value to the next number in a list.
If the value is (187) I need to set the result to (240)
int[] list = new int[] { 16, 25, 35, 50, 70, 95, 120, 150, 185, 240, 300, 400 };
double max;
max = list.Where(x => x <= result).Max();
Run Code Online (Sandbox Code Playgroud)
But this does not work.