private void MergeByRows(DataTable Dt, string SavePath) { Output("Merging the data by row..."); foreach (var Dr in Dt.Rows.Cast <DataRow>()) { if (!Dr.IsMergedAt(SavePath)) { Merge(Dr, SavePath); if (Dr.IsMergedAt(SavePath)) { Dr["Merged"] = true; } Token.ThrowIfCancellationRequested(); } else { Output("Merging Skipped: The data at distance " + Dr["Distance"].ToString() + " has been merged."); } } Output("All data have been merged"); }