How to use the HTML Agility Pack in my Visual Studio project in C #, since I have a table extracted by a webbrowsers object, more when I give some splits in it it gets as an array of almost 700 indexes, I would like to find the elements I want most easily,
private void timer_loteca_Tick(object sender, EventArgs e)
{
//loteca
WebBrowser clienteloteca = new WebBrowser();
clienteloteca.Navigate("http://www1.caixa.gov.br/loterias/loterias/loteca/loteca_pesquisa_new.asp");
clienteloteca.Navigated += clienteloteca_Navigated;
timer_federal.Enabled = false;
}
void clienteloteca_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
try
{
var s = (WebBrowser)sender; ;
string acumulou = string.Empty;
var tabela = s.Document.Body.InnerHtml;
string[] lala = tabela.Split('|');
string[] line22 = Regex.Split(lala[3], "<table" );
string line24 = line22[0].Replace("\r\n","");
string[] line23 = Regex.Split(line24, "</TD>");
var megasena = s.Document.Body.InnerText;
string megasena1 = megasena;
string[] lines = megasena1.Split('|');
string[] line20 = Regex.Split(lines[3], "\r\n");
string[] line30 = Regex.Split(lines[4], "\r\n");
string res1 = line20[1].ToString().Substring(0,1);
string res2 = line20[1].ToString().Substring(1);
string res3 = line20[5].ToString().Substring(0, 1);
string res4 = line20[5].ToString().Substring(1);
string res5 = line20[9].ToString().Substring(0, 1);
string res6 = line20[9].ToString().Substring(1);
string res7 = line20[13].ToString().Substring(0, 1);
string res8 = line20[13].ToString().Substring(1);
string res9 = line20[17].ToString().Substring(0, 1);
string res10 = line20[17].ToString().Substring(1);
string res11 = line20[21].ToString().Substring(0, 1);
string res12 = line20[21].ToString().Substring(1);
string res13 = line20[25].ToString().Substring(0, 1);
string res14 = line20[25].ToString().Substring(1);
string res15 = line20[29].ToString().Substring(0, 1);
string res16 = line20[29].ToString().Substring(1);
string res17 = line20[33].ToString().Substring(0, 1);
string res18 = line20[33].ToString().Substring(1);
}