I'm writing a quick utility app with out of the box win forms and data sets.
private void timer1_Tick(object sender, EventArgs e)
{
if(_maxTimestamp == null) return;
var newRows = commonLogTableAdapter.GetDataByTimestamp(_maxTimestamp.Value);
foreach (var row in newRows.Where(c => !dataSet1.CommonLog.Rows.Contains(c.Id)))
{
dataSet1.CommonLog.ImportRow(row);
}
}
Will the lookup to see if the row already exists have the performance of a hash lookup or could it end up searching the whole collection over and over again?
The documentation for DataRowCollection.Contains Method (Object) doesn't say.