var arrResults = Array1.Join(Array2, x => x.ID, x => x.ID, (first, second) => new
{
IDRecord = first.ID,
Count1 = first.Count,
Count2 = second.Count,
})
.OrderBy(item => item.IDRecord).ToArray();
// bind & display results in datagrid
dataGridView1.DataSource = arrResults;
My above code does exactly what I want it to, and shows the results in a dataGrid control. Now, I'd like to export the results to a text file, C:\output.txt, instead. How do I do this?
My previous attempts usually involve getting errors that say "cannot convert from 'string' to System.Collections.Generic.IEnumerable".