some updates

This commit is contained in:
Andreas Zweili 2017-07-08 08:51:24 +02:00
parent 46bd30a722
commit d0c6c535b5
3 changed files with 4 additions and 5 deletions

View File

@ -20,7 +20,7 @@ namespace first_app
// set { _number = value; }
// }
public Car(string _number)
public Car(string _number = "999")
{
this.number = _number;
}

View File

@ -25,7 +25,7 @@ namespace first_app
Console.WriteLine("Please enter your car number");
string car_number = Console.ReadLine();
Car first_car = new Car(car_number);
Car first_car = new Car();
Console.WriteLine(first_car.number);
Console.ReadKey();

View File

@ -10,10 +10,9 @@ namespace se_12_log_entry
{
Stack<LogEntry> logEntries = new Stack<LogEntry>();
int idCounter = 0;
while (idCounter < 11)
for (int i = 0; i < 20; i++)
{
logEntries.Push(new LogEntry(idCounter, DateTime.Now));
idCounter++;
logEntries.Push(new LogEntry(i, DateTime.Now));
LogEntry newestEntry = logEntries.Peek();
Console.WriteLine("ID:"