There's a bug in the release version of CsQuery for InnerText
... see https://github.com/jamietre/CsQuery/issues/82
Either use the Text()
method, which is a CQ
method so you'd need to wrap the element in a CQ
object, e.g.
STDIN = htmlelement.FirstElementChild.Cq().Text();
..or update to the current prerelease version 1.3.5 beta 5 on nuget which fixes this problem: http://www.nuget.org/packages/CsQuery/1.3.5-beta5
Humblest apologies that this has remained so long in the release version which is a year old now!