I've written some apps using simple imperative way - now I want to learn more about building software the object oriented way.
My goal is to take an Excel file and load one of the tables into memory. I can do this by:
- Creating a list of strings for each row, and store the table in list
- Creating a structure/ class for the records, and store the table in list of objects
The simplest is of course first solution, but I want to know the advantages of second - most importantly which one is better and when?
From my perspective creating an struct/object for each record, and then using fields/properties to get the values makes the program unnecessarily complicated (if I plan to load the table to database even more). For some reason though this was one of the proposed solution this question: Are 2 dimensional Lists possible in c#?.