I am using html agility pack to parse the html using c#.
HtmlNodeCollection hNodes = myHtmDoc.DocumentNode.SelectNodes("//h1");
I am looping through this hNodes. And sometimes it may be null. So how to check whether hNodes is null or not. For string you can use IsNullOrEmpty. Like that here is there anything to check for null. I want result as
If (hNodes != null) DoSomething