using System.Collections.Generic;
using System.Threading.Tasks;
using System.Globalization;
public static void Main()
List<Row> tabulka = new List<Row>();
Dictionary <string, Row> yester_day = new Dictionary<string, Row>();
Dictionary <string, Row> current_day = new Dictionary<string, Row>();
DateTime date_count = new DateTime();
DateTime origin_date = DateTime.ParseExact(row1.Date, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None);
date_count = origin_date;
foreach(var x in tabulka)
DateTime parameterRowDate = DateTime.ParseExact(x.Date, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None);
if (parameterRowDate == date_count)
current_day.Add(x.Channel, x);
else if (parameterRowDate.AddDays(1) == date_count)
date_count = parameterRowDate;
yester_day = current_day;
current_day.Add(x.Channel, x);
int day_difference = (parameterRowDate.Date - date_count.Date).Days;
for (int i = 0; i < day_difference; i++)
date_count = date_count.AddDays(1);
yester_day = current_day;
date_count = parameterRowDate;
foreach(KeyValuePair<string, Row> y in current_day)
Console.WriteLine("---------------------------------------------");
foreach(KeyValuePair<string, Row> y in yester_day)
public string Date {get; set;}
public string Channel {get; set;}
public string Metric {get; set;}