What is the ideal data structure I can use in C# to store data consisting of 1 float and 3 string fields (1000+ rows)? I want it such that the structure is easily serializable to a file and can be easily accessed for updating.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ll post an answer that assumes you already considered and dismissed using a class or a struct for some reason.
As a throwback to my graduate school database courses, I kind of like .NET 4.0’s introduction of the Tuple class. If you were so inclined, you could use
and reference the items with
Tuple is also decorated with the Serializable attribute, so you can serialize them.