c# - Index cannot be 3, only 0 or 1 -


This error code does not prevent it from running, but I would like to fix it. Here is the code, error appears under HtmlElementCollection rows = Y [3]. Get Elementsbaigenem ("tr"); Any information will be appreciated.

  doc.LoadHtml (content); Binding source datasource = new binding source (); Binding source data2 = new binding resource (); HtmlElementCollectionY = Web Browser 1 Document. GetElementsByTagName ("Table"); {HtmlElementCollection Rows = Y [3] .GetElementsByTagName ("tr");   

thanks

this

 < Code> HtmlElementCollection Y = Web Browser 1. Document. GetElementsByTagName ("Table");   

Returns an array of tables, this array has only 2 items, so your index can only be 0 or 1. You can not w [3] because your array does not have 4th element.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -