From d87e6dbdac6b2a274304bf4015d8e7242f0e4fae Mon Sep 17 00:00:00 2001 From: jafreli Date: Mon, 28 Apr 2025 14:34:47 +0200 Subject: [PATCH] Ubung 5 --- Ubung/Program.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Ubung/Program.cs b/Ubung/Program.cs index a1fe0ad..c1859ff 100644 --- a/Ubung/Program.cs +++ b/Ubung/Program.cs @@ -70,4 +70,19 @@ Console.WriteLine(SearchStudent(rooms, "Jakob")); string SearchStudent(Dictionary studentInClasses, string student) { return studentInClasses.First(o => o.Value.Contains(student)).Key; -} \ No newline at end of file +} + +// Ubung 5 +DateTime datum = new DateTime(2001, 9, 11); +var datum1 = new DateTime(2001, 9, 11); +DateTime datum2 = new(2001, 9, 11); + +string s = "2001"; +int res; + +_ = int.TryParse(s, out res); + +Console.WriteLine(datum); +Console.WriteLine(datum1); +Console.WriteLine(datum2); +Console.WriteLine(res);