I want to ask someone who has stronger skills than me in C#.
Is it possible to reduce the following code
if(val > 20 && val < 40 )
...
else
if(val > 40 && val < 72 )
...
else
if(val > 72 && val < 88 )
...
else
...
Let's assume that I have over 10-11 if-else
statements.
What's the best way to shorten the above code?
I thought at something like between
in sql.