C
C#•11mo ago
Maxen

How to convert an int array to a string or at least be able to write it all out through a WriteLine

As said, I have a few int arrays that I want to be able to write out the individual values for, but whenever I have tried to convert it all to a string then nothing has ended up working anyway and it just says Int32.....something something whenever I try to print out the values (I don't need to actually do anything with the values themselves, so as long as you can get them to print out one by one through the array then that is all that would need to be done)
8 Replies
Pobiega
Pobiega•11mo ago
Have a look at string.Join Or just loop over the array, if you want it one by one
Maxen
MaxenOP•11mo ago
I mean if I can convert the whole array then I can just print them out individually afterwards but if there's an easy way to do it one by one then that works too could you send an example how to properly use it? Quite new to this 👀
Pobiega
Pobiega•11mo ago
String.Join Method (System)
Concatenates the elements of a specified array or the members of a collection, using the specified separator between each element or member.
wtq40cy3n
wtq40cy3n•11mo ago
why not ask gpt first, it's can be solved quickly
Pobiega
Pobiega•11mo ago
A google search and/or official docs should always go before using AI - otherwise you have no ability to vet the answer from the hallucinating AI :p
Jimmacle
Jimmacle•11mo ago
AI and trying to learn something are a bad combination it's only really useful if you already have the skill to confirm that it's correct
Unknown User
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
wtq40cy3n
wtq40cy3n•11mo ago
What I meant is AI helps reorganizing your question especially when you don't know how to well express it. That's something search engine can't do. It can be useful to learn about language features and BCL. Not suitable for beginners if they only focus on solution
Want results from more Discord servers?
Add your server