当谈到然后转到外复位的foreach。也就是说,计数器的值没有保存。foreach (HtmlAgilityPack.HtmlNode table in doc.DocumentNode.SelectNodes("//div[@class='top_b']"))
{
Outer:
foreach (HtmlNode b in table.SelectNodes("b"))
{
MessageBox.Show(b.InnerText.ToString());
foreach (HtmlNode p in table.SelectNodes("p"))
{
MessageBox.Show(p.InnerText.ToString());
foreach (HtmlAgilityPack.HtmlNode class_table in table.SelectNodes("//table[@class='t']"))
{
MessageBox.Show(class_table.InnerText.ToString());
goto Outer;
}
}
}
}
PS /借口,我的英语水平:Radzhab