No, you're not the only one. Actually, I was very surprised when I first learned that it wasn't possible to combine matches like this (spoiled by C++ switches, I guess).

Often, if I have a lot of similar matches that I'd like returning the same value, I switch to an if-then-else statement. It makes it easier to both read the code and modify it in the future while reducing errors.

Regards,

z.

By on 1/22/2008 11:23 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper