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
Have a look at
string.Join
Or just loop over the array, if you want it one by oneI 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 👀
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.
why not ask gpt first, it's can be solved quickly
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
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•11mo ago
Message Not Public
Sign In & Join Server To View
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