I have a collection of objects and am curious about the way you would separate them into two lists - one list will have everything of a specific type, the other will have the remainder. One way I thought of doing it is:
var typeXs = (from o in collectionOfThings where o.Type == "typeX" select o);
var notTypeXs = (from o in collectionOfThings where o.Type != "typeX" select o);
The other way would be to just loop over collectionOfThings and assign based on if/else.
Both ways are simple and readable, but I'm just wondering if there is an even slicker way?