E20 Ex 1 - 3
This commit is contained in:
parent
4706d2abba
commit
0f413715ac
@ -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*/
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user