NextRow

Row.NextRow property

Gets the next Row node.

public Row NextRow { get; }

Remarks

The method can be used when you need to have typed access to table rows. If a StructuredDocumentTag node is found in a table instead of a row, it is automatically traversed to get a row contained within.

Examples

Shows how to enumerate through all table cells.

Document doc = new Document(MyDir + "Tables.docx");
Table table = doc.FirstSection.Body.Tables[0];

// Enumerate through all cells of the table.
for (Row row = table.FirstRow; row != null; row = row.NextRow)
{
    for (Cell cell = row.FirstCell; cell != null; cell = cell.NextCell)
    {
        Console.WriteLine(cell.GetText());
    }
}

See Also