This is my first time doing my work with HAP, but I find a problem with HtmlDocument
class, I can't use it, because intellisense tells me that it is ambiguous reference, this is the picture :
I have imported the library needed it this code which are using HTML_Agility;
using HtmlAgilityPack;
and I also add reference to its DLL file but it can't help me so much. Do you know why this happens and how to fix it?
To avoid the ambiguous reference write like this:
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
There's also exists a System.Windows.Forms.HtmlDocument
class.
Try explicitly qualifying your classname instead of using a using
statement, or rename the class with a using
statement such as using HAPDocument = HtmlAgilityPack.HtmlDocument;
(and then use HAPDocument
instead of HtmlDocument
in your source code).