Commit edadd871 authored by Uwe Wienkop's avatar Uwe Wienkop

2020-06-08a

parent bd6e3e9f
......@@ -21,6 +21,7 @@ using System.Collections.Generic;
// DigBB | { ...
// Ebene 1: 12 Elemente, 10 Elemente, 10 Einträge/Proj.
// Suchschritte: 6 + 5 + 5 = 16
// KeyValueList<int,KeyValueList<string,List<Termin>>> givemeAName
// Variante 2: Ebene 1: Datum; Value 1: Restl. Infos
// 09-06 | {
......@@ -30,6 +31,8 @@ using System.Collections.Generic;
// 10-06 | {
// 09:45, Vorlesung, DigBB, alle
// }
// DateTime datum = new DateTime(2020, 6, 9)
// KeyValueList<DateTime, List<Termin>> organizer = ....
// Ebene 1: 240 Arbeitstage, Ebene 2: 5 Elemente
// Suchschritte: 120 + 3 = 123
......@@ -39,7 +42,7 @@ namespace _07KeyValueList
{
public string was;
public string wer;
public Termin(string was, string wer) { this.was = was;this.wer = wer; }
public Termin(string was, string wer) { this.was = was; this.wer = wer; }
public override string ToString() => $"Termin: {was} mit {wer}";
}
class Program
......@@ -50,6 +53,9 @@ namespace _07KeyValueList
kvListe["Wienkop"] = 1614;
kvListe["Otsa"] = 1855;
Console.WriteLine($"Telefonnummer von Wienkop: {kvListe["Wienkop"]}");
Console.WriteLine("-----------");
kvListe.Print();
Console.WriteLine("-----------");
kvListe["Otsa"] = 9999;
......@@ -66,20 +72,36 @@ namespace _07KeyValueList
List<Termin> termineMi = new List<Termin>();
termineMi.Add(new Termin("08:00 Prog2-Vorlesung", "Gruppe-Wienkop"));
termineMi.Add(new Termin ("09:45 Dig Bildbearbeitung","MA-MIN"));
termineMi.Add(new Termin("09:45 Dig Bildbearbeitung", "MA-MIN"));
List<Termin> termineDi = new List<Termin>();
termineDi.Add(new Termin("08:00 Prog2-Übung", "Gruppe-Wienkop"));
termineDi.Add(new Termin("09:45 Prog2-Vorlesung", "Gruppe-Wienkop"));
termineDi.Add(new Termin("11:30 Mitarbeiterbesprechung","Jobbörse"));
termineDi.Add(new Termin("11:30 Mitarbeiterbesprechung", "Jobbörse"));
KeyValueListe<string, List<Termin>> terminverwaltung = new KeyValueListe<string, List<Termin>>();
terminverwaltung["03.06.2020"] = termineMi;
terminverwaltung["02.06.2020"] = termineDi;
terminverwaltung["03.06.2020"] = termineMi;
terminverwaltung["02.06.2020"].Add(new Termin("11:30 Teams", "BayernMINT"));
KeyValueListe<string, KeyValueListe<char, string>> l3 = new KeyValueListe<string, KeyValueListe<char, string>>();
l3["Wienkop"]['A'] = "Teambesprechung";
// Pfannkuchen, Zutagen(Mehl, Milch, Eier), Zubereitung
KeyValueListe<string, (List<string>, List<string>)> rezepte = new KeyValueListe<string, (List<string>, List<string>)>();
List<string> zutaten = new List<string>();
zutaten.Add("Mehl");
zutaten.Add("Milch");
zutaten.Add("Eier");
List<string> zubereitung = new List<string>();
zubereitung.Add("Eier in Schüssel schlagen");
zubereitung.Add("mit Mehl und Milch verrühren");
rezepte["Pfannkuchen"] = (zutaten, zubereitung);
List<string> zutaten2;
List<string> zubereitung2;
(zutaten2, zubereitung2) = rezepte["Pfannkuchen"];
//KeyValueListe<string, KeyValueListe<char, string>> l3 = new KeyValueListe<string, KeyValueListe<char, string>>();
//l3["Wienkop"]['A'] = "Teambesprechung";
foreach (var tag in terminverwaltung)
{
......@@ -89,6 +111,16 @@ namespace _07KeyValueList
Console.WriteLine(item);
}
}
if ((2, 3, "2020").CompareTo((2, 3, "2020")) == 0)
Console.WriteLine("Ist gleich");
else
Console.WriteLine("Ist ungleich");
KeyValueListe<int, KeyValueListe<string, List<string>>> t3 = new KeyValueListe<int, KeyValueListe<string, List<string>>>();
t3[6]["Prog2"] = new List<string>();
t3[6]["Prog2"].Add("09.45 Vorlesung");
}
}
}
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v3.1",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v3.1": {
"07 UebgSa_KeyValueList/1.0.0": {
"runtime": {
"07 UebgSa_KeyValueList.dll": {}
}
}
}
},
"libraries": {
"07 UebgSa_KeyValueList/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
\ No newline at end of file
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\wienkop\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\wienkop\\.nuget\\packages"
]
}
}
\ No newline at end of file
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "3.1.0"
}
}
}
\ No newline at end of file
......@@ -237,7 +237,7 @@ namespace _07KeyValueList
{
Element item = ElementSearch(key);
if (item != null) // Existiert der Schlüssel schon in der Liste?
item.val = value; // JA: Wert aktualisieren
item.val = value; // JA: Wert zurückliefern
else
AddEnd(key, value); // NEIN: Neues Schlüssel|Wert-Objekt der Liste hinzufügen
}
......
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\bin\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.exe
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\bin\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.deps.json
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\bin\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.runtimeconfig.json
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\bin\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.runtimeconfig.dev.json
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\bin\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.dll
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\bin\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.pdb
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\obj\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.csprojAssemblyReference.cache
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\obj\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.AssemblyInfoInputs.cache
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\obj\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.AssemblyInfo.cs
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\obj\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.csproj.CoreCompileInputs.cache
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\obj\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.dll
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\obj\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.pdb
C:\Users\wienkop\source\repos\prog2-ss2020-wienkop\07 UebgSaKeyValueList\obj\Debug\netcoreapp3.1\07 UebgSa_KeyValueList.genruntimeconfig.cache
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment