jseb
jseb
CC#
Created by jseb on 2/9/2023 in #help
List output with Console.Write
ah nice concatenation function ! I will now explore string class, to see what it offers. Thank you for the help.
6 replies
CC#
Created by jseb on 2/9/2023 in #help
List output with Console.Write
well anyway, getting fb last value with index ugly and slow (as recomputed at each iteration) so at least i can propose:
var fb = new List<int> {1, 1};

for (int i=0; i<10; i++) {
fb.Add(fb[i]+fb[i+1]);
}

int last=fb.Last();
foreach(var n in fb) {
var sep="; ";
if (n == last) { sep=""; }
Console.Write($"{n}{sep}");
}
var fb = new List<int> {1, 1};

for (int i=0; i<10; i++) {
fb.Add(fb[i]+fb[i+1]);
}

int last=fb.Last();
foreach(var n in fb) {
var sep="; ";
if (n == last) { sep=""; }
Console.Write($"{n}{sep}");
}
6 replies
CC#
Created by MisterAmigo on 2/9/2023 in #help
❔ Unity Saving userinput data for next scene
it's more a question about unity than about C#, you should try unity discord
3 replies