Ubung 5
This commit is contained in:
@@ -70,4 +70,19 @@ Console.WriteLine(SearchStudent(rooms, "Jakob"));
|
|||||||
string SearchStudent(Dictionary<string, string[]> studentInClasses, string student)
|
string SearchStudent(Dictionary<string, string[]> studentInClasses, string student)
|
||||||
{
|
{
|
||||||
return studentInClasses.First(o => o.Value.Contains(student)).Key;
|
return studentInClasses.First(o => o.Value.Contains(student)).Key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|||||||
Reference in New Issue
Block a user