If getting the first/last row is as following:
TableRow lastRow = theTable.Elements<TableRow>().Last();
TableRow firstRow = theTable.Elements<TableRow>().First();
How to select the second last row?
Try this:
TableRow firstRow = theTable.Elements<TableRow>().Reverse().Skip(1).First();
Note, that this expression can throw an exception if no suitable row is available (also Last
and First
).