Switch statement fallthrough is one of my personal major reasons for loving switch vs. if/else if constructs. An example is in order here:
static string NumberToWords(int number)
{
string[] nu...
Agreed, multiple if statements are much more readable, in my opinion. I generally think switch statements are always just a little too ugly unless their dead simple.
Switch expressions, on the other hand, are gorgeous code (as long as you don’t use expression-bodied cases). I am always looking for chances to use switch expressions. So concise
Agreed, multiple if statements are much more readable, in my opinion. I generally think switch statements are always just a little too ugly unless their dead simple.
Switch expressions, on the other hand, are gorgeous code (as long as you don’t use expression-bodied cases). I am always looking for chances to use switch expressions. So concise
When the if/else is large I’m in the dictionary of functions boat.
That doesn’t sound very effective though.
It works for older platforms that only run CF 3.5
Is CF still a thing? But anyway, if it works, it works :)