public static List <Bar> getTopBars() { var sorted = EstablishmentsData.getBars().OrderBy(g => g._Rating).Reverse().ToList(); var temp = sorted.GetRange(0, 5); return(temp); }
static void Main(string[] args) { RefreshEstablishmentsData.Refresh(EstablishmentsData.getEstablishments()); Timer timer = new Timer(1000); timer.Elapsed += (sender, argums) => { foreach (var rest in EstablishmentsData.getEstablishments()) { rest.Toggle(); } }; timer.Start(); timer.AutoReset = true; Console.ReadKey(); }