When I Googled the problem myself, people suggest to do it this way:
WebBrowser web = new WebBrowser;
web.DocumentText = htmlString;
HtmlDocument doc = web.Document;
This leaves doc as null. Any idea what could be going wrong? Debugging in Visual Studio seems to tell me that this:
web.DocumentText = htmlString;
doesn't do anything. Any help would be appreciated! Thanks.