Very simple:
IEnumerable<ObjectB> allBs = collection.OfType<ObjectB>();
Or:
IEnumerable<AbstractObject> allBy = from b in collection
where b is ObjectB
select b;
The second query retains the same enumerated type as the collection, the first implicitly discards IEnumerable<ObjectB>.
, IEnumerable<ObjectB>.
IEnumerable<ObjectB> allBs = (from b in collection
where b is ObjectB
select b).Cast<ObjectB>();
IEnumerable<ObjectB> allBs = from b in collection
where b is ObjectB
select b as ObjectB;