How to Load a Flat Text File Into a Table in C# and Use LINQ in Order to Query for Data Fields
Posted on 2011-10-26
I have a flat file that I am reading data from and I am currently reading the data into an ArrayList. I will need to update the application to be able to read in more than one data file, and I was wondering if someone could explain to me how I would read the data in from a *.dat file and use LINQ in order to get the specific fields from the data table that would be created from reading in the information from the flat file. (I do have business rules that split the flat data table into different fields, and I would like to be able to store these fields within a temporary table in memory so that I could query them and be able to pull back results based on the information a user enters. Could someone direct me to example code that completes this task or if they could help me with the syntax that I would need in order to accomplish this task?
Any help with this task would be greatly appreciated.