reading text file seperated by Pipes
-
hi to all, I have to read a file that contains records seperated by commas. Each records in a row may contain different different number of fields. I have to check whether the particular row contains all the necessary records by using the first column of each record. The first column of each row contains the key which is to be used to fetch the data from the database about the columns info of the records. thanx in advance
-
hi to all, I have to read a file that contains records seperated by commas. Each records in a row may contain different different number of fields. I have to check whether the particular row contains all the necessary records by using the first column of each record. The first column of each row contains the key which is to be used to fetch the data from the database about the columns info of the records. thanx in advance
Hey.. looks like this is your class assignment !! Dude, do some reading & RND. Regards, Bhupi Bhai.
-
Hey.. looks like this is your class assignment !! Dude, do some reading & RND. Regards, Bhupi Bhai.
-
hi to all, I have to read a file that contains records seperated by commas. Each records in a row may contain different different number of fields. I have to check whether the particular row contains all the necessary records by using the first column of each record. The first column of each row contains the key which is to be used to fetch the data from the database about the columns info of the records. thanx in advance
You can use
StreamReader.ReadLine
to read information in the file line by line andString.Split
to seperate the records.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
You can use
StreamReader.ReadLine
to read information in the file line by line andString.Split
to seperate the records.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
http://www.codeproject.com/cs/database/GenericParser.asp[^] or http://www.codeproject.com/cs/database/CsvReader.asp[^] Once you've parsed the row, you just need to interpret the data within the row as needed. I hope that helps :-).