You can add you data to a datatable
DataTable dt = new DataTable();
dt.Rows.Add("Mydata1", "Mydata2", "Mydata3", "Mydata4");
while read your loop will continue adding rows
And then you retreive your data,
int MyCounter = 0
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
{
string RetreiveData1 = dt.Rows[MyCounter].ItemArray["Mydata1"].ToString();
string RetreiveData2 = dt.Rows[MyCounter].ItemArray["Mydata2"].ToString();
MyCounter += 1;
}
}
You use MyCounter to move to next row.
I hope this helps!