Skip to main content
6 events
when toggle format what by license comment
Jul 27, 2016 at 4:11 comment added Snixtor It's a common trend for software architecture in general. Search for articles describing the "single responsibility principle".
Jul 27, 2016 at 1:15 comment added Ayb4btu Having this class as a reader instead of a file representation seems to match the common trend of these answers. So going down that route is probably the better way forward. Thanks.
Jul 27, 2016 at 0:24 comment added Snixtor I would still encourage separating the reader from the result of the read. If you're wanting something to "represent" a CSV file on disk, you might consider using System.IO.FileInfo. The class is sealed, so you wouldn't be able to inherit from it, but you could add extension methods like bool IsCsv() and DefinitionData ReadCsvDefinitionData(). The ReadCsvDefinitionData() method would create and use an instance of your CsvCountReader class.
Jul 26, 2016 at 23:47 comment added Ayb4btu Your added info has been helpful. I intended the class CsvSporeCountFile to both read and represent a csv file on disk, rather than just being a reader. So based on the given answers it now takes in the file path at the constructor, reads the data, and holds it. Therefore it reads to the end of the data instead of one record at a time.
Jul 26, 2016 at 22:43 review First posts
Jul 26, 2016 at 22:50
Jul 26, 2016 at 22:41 history answered Snixtor CC BY-SA 3.0