✅ write multiple Lists to file
I want to write several items from lists that have same index to text file, what is the easiest way
49 Replies
what do u mean by
same index to text file
@It's_Sam
is this what you're wanting?
@TheRanger
The value inside the List have same index
Why does the index matter...?
do both lists have equal length in elements in relation to the specific index??
Write all lines from one list
Write all lines from the second list
Done
@driveby no they don't have same length
and you're wanting index N from both lists written to a file?
It's a project for college
And I'm storing infos in lists
you want all those in 1 file?
just do what he said
Ah
I see the issue... I think
Yes in 1 file
Instead of having a list of objects, you have multiple lists storing properties
why not make a class called Ship with properties Name, Price , etc....
Instead of a list of people, each of which has a name and age, you have a list of names and list of ages
That's not the way to go about it whatsoever
ohhhhhhhh
i see what he needs
like this? i havent tested
but something similiar?
dynamic
dont ever use dynamic, ever
Jesus
u can see
the comment
You made it worse
stop being weird
yes i can see the comment
Using
dynamic
is what's weirdur point?
Just make up some random
Order
class or whateverI'm wondering what would be right
A little Joyner asking lol
Using
dynamic
even as an example tells people it's fine to use it
It's not fine to use it
A class that describes your objectswell, at this rate, they're just criticizing stupid shit, hopefully they'll help you
pce
something like
and in ur class Shipping
This the final class where show to user what he put in the cart
You can say it's just using
Console.writeline
after showing it in Console app
I want to save it in file to desktop
Structure your data properly and writing it to a file won't be an issue
lol how are you an associate with that kinda attitude 😂
?
@TheRanger
I will shook you
I tried a lot to know how to use properties and Didn't get it 💔
"How do I eat soup with a fork"?
"You shouldn't, use a spoon instead"
"lol how are you an associate with that kinda attitude 😂"
Whatever, issue seems to be solved
That's what matters
Can u guys recommended to me a video or doc for properties plz 🥹😂
well id recommend you this tutorial $helloworld
Written interactive course https://learn.microsoft.com/en-us/users/dotnet/collections/yz26f8y64n7k07
Videos https://dotnet.microsoft.com/learn/videos
if you want to only see a video for properties specifically, it should be somewhere in the videos link
but in general, you should learn all of the fundamentals of C#
@TheRanger
I write about 700 line
For this project
Bot oop it's kinda new to me so iam facing some issues
take your time
OOP is the base of C#
It's honestly impressive you managed to write something this big without OOP, only got stuck on saving data to a file
Nooo
It have 9 classes
It's fully oop
@Angius
Ah, gotcha
I thought it's all written with parallel lists of properties lol
But this is the first time i made an oop console app
@Angius
Can i talk to u in dm to ask for several things?
Not really, no
Feel free to ask here
ull get help from more than a single person in here
Ok thank you all very much for giving me a hand
/close