❔ How to display All the integers in a list concatenated with a string
Hello! I was wondering if there was a possible way of cancatenating elements inside a list (that are integers) and combining it inside a console.WriteLine without having to do list.[index]. I was thinking of a for loop, but couldn't get it to print it all out in one line.
9 Replies
yes it is possible.
It isn't clear what you are asking specifically, but the
string.Join(", ", cards)
might be what you are asking for
there are other methods that could help too
so like
OH Got it thank you so much!
also... are you by chance going through the games in the
dotnet-console-games
repo?Nope, I have no clue what that is lol
I was just searching random simple C# projects to do to improve my skills lol
You appear to have been working on
- blackjack
- tic tac toe
- rock paper scissors
and this repo has examples of all of those apps:
https://github.com/dotnet/dotnet-console-games
Oh Damn never knew that lol
Thanks for that!
If you have questions about that repo feel free to "@" me 🙂
Sounds good! Thank you so much for your help, I really appreciate it!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.