Hi All,

I am new in C#. Please suggest me some solution for the following code snippet in Microsoft Visual Studio .

WebBrowser webBrowser1 = new WebBrowser();

HtmlDocument oDc = webBrowser1.Document

ElementCollection elems;
elems = oDc.GetElementsByTagName("A"); //Getting error

For any method used for HtmlDocument(Odc) its giving error :
Object Reference not set to instance of an object