Queries Using TypeOf

This is something I’ve run across now and then. In some cases you may find someone who decides to stick a bunch of different types in a collection. Now I’m a big proponent of using strongly types object, collections, etc… However I know not everyone does that. Or there might be a situation where it didn’t happen that way. Here’s one of many ways that you can use a LINQ query to extract different kinds of data from an abstract collection.

Continue reading