.NET: Best way to write text files
Posted on 2008-11-17
Hi, I am writing data from a database to a text file, actually an xml file, to which I apply my own formatting in order to transform it in a pdf. I am using iTextCSharp utility. Here is my proceeding: I load all the data from the database to the server memory and from there I write the data chunck by chunk to a xml file on the local hard drive (using a TextWriter) and once done, I transform that file into xml. My question is, since I don't gain so much in performance (I just was looking for a way of avoiding memory overrun), is there a better way of getting the same result by the same time gaining performance?