Here is a brief example of how you can select any two columns using Linq for a DataSet:
public static void SelectRandomColumns(DataTable dataTable, string col1, string col2)
{
var query = from row in dataTable.AsEnumerable()
select new
{
p1 = row[col1],
p2 = row[col2]
};
foreach (var item in query)
{
Console.WriteLine("{0}: {1}, {2}: {3}", col1, item.p1, col2, item.p2);
}
}
, , , , .