Error!
Success!

Case Switching on CLR Types

0
kicks

Case Switching on CLR Types  (Unpublished)

As most .NET developers know, you cannot do case/switch on CLR types and one of the reasons for it was explained pretty well years ago by Peter Hallam on the C# team. But there are many cases where you would like to iterate through a list of objects if mixed types and do specific things depending on it’s type. For fun I started to try out different ways to do it, some are better than others but they all do the same thing, more or less. I’m also exploring method extensions, method chaining and lambdas and some of the samples almost started to become fluent and DLS like.


Kicked By:
Drop Kicked By: