✅ i want to save several list to text file
I have many List<t> and want to save their values to one text file how can i do it
27 Replies
Didn't you ask about it before, and were advised to just use proper classes instead of lists of properties?
Indeed, #✅ write multiple Lists to file
Something doesn't work still?
@Angius
Sorry but i didn't know how to do it
TheRanger#3357
something like
and in ur class Shipping
Quoted by
<@!85903769203642368> from #write multiple Lists to file (click here)
React with ❌ to remove this embed.
@Angius
I don't know how to use getters and setters to do it
I need fully explained code for it with getters and setters
You don't use them, not directly
So how to copy list items to this?
There's plenty of ways you can go about serializing that data - could do it csv-style, or even json
depends on your needs
I'm literally a beginner and this is my first oop so i don't know how to do it unfortunately and Googled it a lot and didn't find what i want
This is how you make a list of those classes
If you need to add one outside of the initialization,
And saving it to a file could not be easier
Oh my god
I going to jump from the mountain
Thank you a lot ❤️
@Angius
What do you think about save each list separately and then combine the files in one?
Makes no sense
It's called junior solutions hahahah
Do you keep track of your phone contacts with
or
?
Of course second one
Exactly
But the deadline tomorrow and i don't understand the first way
Literally I'm going to cry
Whelp, happens
I guess you can turn your weird bunch of lists into a list of objects
Ok
And save this final one to text file instead of bunch of Lists
ye
I have an Idea if it possible instead of edit all code can i copy the bunch of Lists to this one ?
@Angius
Yes, I even showed you how
What is the namespace for saving to text command
@Angius
I found it !
Put how i will put the path ?
Angius#1586
Quoted by
<@!85903769203642368> from #i want to save several list to text file (click here)
React with ❌ to remove this embed.
my-data.json
is the path
Adjust as you needI want to thank you very much
Because off many things
1st you helped me a lot
2nd your idea to clone the lists made me know how to use getters and setters
3rd you saved my back
@Angius
I take it, that everything works now?
Nice, glad to hear
Yes everything works 🙌🏻