Is it possible to do a cast within a LINQ query (for the compiler\'s sake)?
The following code isn\'t terrible, but it would be nice to make it into one query:
Depending on what you are trying to do, one of these might do the trick:
List parentLineList1 =
(from t in content.ChildControls.OfType()
from p in t.ChildControls.OfType()
from pl in p.ChildControls.OfType()
select pl).ToList();
List parentLineList2 =
(from TabSection t in content.ChildControls
from Paragraph p in t.ChildControls
from Line pl in p.ChildControls
select pl).ToList();
Note that one uses OfType