示例#1
0
 private void DisplayTransactionsFileMenuItem()
 {
     Console.WriteLine("Display Transactions.log");
     try
     {
         var transactions = _parking.GetTransactionsFile().Split(' ');
         for (var i = 0; i < transactions.Length - 3; i++)
         {
             Console.WriteLine(
                 $"Date: {transactions[i]} Time: {transactions[++i]} Amount for the last minute: {transactions[++i]}. The total number of transactions for the last minute: {transactions[++i]}.");
         }
     }
     catch (Exception e)
     {
         Console.WriteLine("Oops! We are not able to show you the file. Please try again later.");
     }
 }