E20 Ex 1 - 3

This commit is contained in:
sebi 2025-02-24 17:15:11 +01:00
parent 4706d2abba
commit 0f413715ac
3 changed files with 9 additions and 2 deletions

View File

@ -13,7 +13,7 @@ namespace Exercises_C_Sharp.E20_Lists
for(int i = 0; i < 10; i++)
{
/*Code START*/
intList.Add(i + 1);
/*Code ENDE*/
}

View File

@ -11,7 +11,10 @@ namespace Exercises_C_Sharp.E20_Lists
//Erstellen Sie eine Liste, in die unten die drei Werte reingeschrieben werden:
/*Code START*/
dynamic superList = 1;
List<string> superList = [];
//List<string> superList = new();
//List<string> superList = new List<string>();
//var superList = new List<string>();
/*Code ENDE*/
superList.Add("Hallo");

View File

@ -15,7 +15,11 @@ namespace Exercises_C_Sharp.E20_Lists
stringList.Add("'s?");
/*Code START*/
stringList.Insert(0, "Hallo");
stringList.Insert(2, " geht");
//ODER:
stringList = ["Hallo, wie geht's?"];
/*Code ENDE*/