Dictionary Übungen erweitert & zur Program hinzugefügt
Sorting angepasst Multithreading angefangen
This commit is contained in:
18
Program.cs
18
Program.cs
@@ -448,6 +448,23 @@ namespace Exercises_C_Sharp
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//************************
|
||||||
|
//******Dictionary********
|
||||||
|
//************************
|
||||||
|
ExerciseGroup dictionaryElements = new ExerciseGroup()
|
||||||
|
{
|
||||||
|
Name = "Schulaufgaben",
|
||||||
|
ElementList = new List<ExerciseElement>()
|
||||||
|
{
|
||||||
|
new ExerciseElement(){Name = "Aufgabe 1", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_1.Start},
|
||||||
|
new ExerciseElement(){Name = "Aufgabe 2", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_2.Start},
|
||||||
|
new ExerciseElement(){Name = "Aufgabe 3", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_3.Start},
|
||||||
|
new ExerciseElement(){Name = "Aufgabe 4", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_4.Start},
|
||||||
|
new ExerciseElement(){Name = "Aufgabe 5", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_5.Start}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//************************
|
//************************
|
||||||
//****Sortieren*******
|
//****Sortieren*******
|
||||||
//************************
|
//************************
|
||||||
@@ -494,6 +511,7 @@ namespace Exercises_C_Sharp
|
|||||||
filesystemElements,
|
filesystemElements,
|
||||||
mysqlElements,
|
mysqlElements,
|
||||||
sortElements,
|
sortElements,
|
||||||
|
dictionaryElements,
|
||||||
|
|
||||||
examElements
|
examElements
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ namespace Exercises_C_Sharp.XX_Dictionary
|
|||||||
{
|
{
|
||||||
class Exercise_4
|
class Exercise_4
|
||||||
{
|
{
|
||||||
//...
|
//Addieren Sie alle Value-Werte mit geraden Index auf und geben Sie das Ergebnis aus.
|
||||||
public static void Start()
|
public static void Start()
|
||||||
{
|
{
|
||||||
Dictionary<string, string> dic = new();
|
Dictionary<int, double> dic = new() {{1, 14.85}, {2, 58.52}, {3, 8.63}, {4, 6.49}, {5, 62.85}, {6, 2.22}, {7, 3.33}, {8, 9.99}};
|
||||||
|
|
||||||
//Code Start
|
//Code Start
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ namespace Exercises_C_Sharp.XX_Dictionary
|
|||||||
{
|
{
|
||||||
class Exercise_5
|
class Exercise_5
|
||||||
{
|
{
|
||||||
//...
|
//Der User soll hier ein Wort eingeben. Wenn es sich schon im Dictionary befindet, dann soll die Übersetzung ausgegeben werden. Wenn nicht, dass soll der User die Übersetzung eingeben und beide Elemente sollen in dem Dictionary gespeichert werden. Groß- und Kleinschreibung soll keine Rolle spielen.
|
||||||
public static void Start()
|
public static void Start()
|
||||||
{
|
{
|
||||||
Dictionary<string, string> dic = new();
|
Dictionary<string, string> dic = new(){{"black", "schwarz"}, {"exception", "Ausnahme"}, {"barrel", "Fass"}};
|
||||||
|
|
||||||
//Code Start
|
//Code Start
|
||||||
|
|
||||||
|
|||||||
0
XX_Multithreading/Exercise_1.cs
Normal file
0
XX_Multithreading/Exercise_1.cs
Normal file
0
XX_Multithreading/Exercise_2.cs
Normal file
0
XX_Multithreading/Exercise_2.cs
Normal file
0
XX_Multithreading/Exercise_3.cs
Normal file
0
XX_Multithreading/Exercise_3.cs
Normal file
0
XX_Multithreading/Exercise_4.cs
Normal file
0
XX_Multithreading/Exercise_4.cs
Normal file
0
XX_Multithreading/Exercise_5.cs
Normal file
0
XX_Multithreading/Exercise_5.cs
Normal file
Reference in New Issue
Block a user