I have a client that wants a text file with all the text on a single line. Like an EDI file has.
I have a datatable with thousands of customers and customer information. My method loops through the datatable grabs the customer info and writes it to a text file. Each line in the text file has information for one customer. There are thousands of customers, which means thousands of lines in the text file.
I don't know how to put all the customers on one single line in the text file. If anybody has some suggestions I would appreciate it.
Instead of using
WriteLine
to write each customer, you can useWrite
(which won't add the new line), and alsoWrite
some delimiter (space, tab, etc) between each customer.