When dealing with the new Switch case constructs, I always wanted to add more to it. After adding things to it like, replacing the previous switch /case with lambdas, then adding a StringComparer and then adding IComparer, I thought let us add something really useful to it. The switch with Types is always one might have wanted with traditional switches. Here is an implementation of Switch/Case constructs using lambdas to enumerate type of an object.
No comments:
Post a Comment