This repository has been archived on 2020-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
ibz/software/1_sem/se-12-log-entry/se-12-log-entry/Program.cs

28 lines
788 B
C#

using System;
using System.Collections.Generic;
using System.Security.Policy;
namespace se_12_log_entry
{
internal class Program
{
public static void Main(string[] args)
{
Stack<LogEntry> logEntries = new Stack<LogEntry>();
int id_counter = 0;
while (id_counter < 11)
{
logEntries.Push(new LogEntry(id_counter, DateTime.Now));
id_counter++;
LogEntry newestEntry = logEntries.Peek();
Console.WriteLine("ID:"
+ newestEntry.ID
+ " Date:"
+ newestEntry.Date);
System.Threading.Thread.Sleep(2000);
}
}
}
}