Reading DataSet

后端 未结 4 617
时光说笑
时光说笑 2020-12-12 13:54

How do I read data from a DataSet in WPF? I have a train schedule table with just 2 columns and I want to be able to read the departure times and calculate when the next tra

4条回答
  •  时光说笑
    2020-12-12 14:27

    If ds is the DataSet, you can access the CustomerID column of the first row in the first table with something like:

    DataRow dr = ds.Tables[0].Rows[0];
    Console.WriteLine(dr["CustomerID"]);
    

提交回复
热议问题