This is done in order to keep CsQueryin line with jQuerythat which behaves the same. You can convert it back to an object CQby calling the method .Cq()as such
foreach (var li in items)
{
var newTournament = false;
var test = li.Cq().Find("header h2");
}
Or, if you want more jQueryish syntax , the following also works:
foreach (var li in items)
{
var newTournament = false;
var test = CQ.Create(li)["header h2"];
}
Your code could be reinstalled if you wanted:
var texts = CQ.Create(htmlString)[".blog-accordion li header h2"]
.Select(x=>x.Cq().Text());
source
share