Tag Archives: switch-case

A better switch with Lambdas in .NET, Part 3 (Adding a IComparer)

By | September 13, 2013

Well, after the previous two post, I think you have clearly got an idea on how the Lambda switcher works and even you might have already started applying them in your day to day projects. While, I have shown Equals comparison and one for StringComparison, sometimes, this couldn’t facilitate everything that we need. In this post, I would… Read More »

A better switch with Lambdas in .NET, Part 2 (A StringComparison implementation)

By | September 12, 2013

In my previous post, I have implemented one simple Lambda based switch case which complement the existing switch cases with some additional support of other objects that implements Equals operator in their code. But the implementation that I have provided wouldn’t made you much sense to add in your project or if you are really a fan of… Read More »

A better switch with Lambdas in .NET, Part 1

By | September 11, 2013

I don’t know which programming language you belong to, or which is the best language you have been working on… but one of the best syntax that I think you should be proudly using is the very old switch / case operators. The Switch/case operator gives an clean and clear look on what the code is intended to… Read More »