Klaus H. Probst <us*******@vbbox.com> wrote:
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote
Sure beats writing your own conversion code.
I think the code required to run the conversion tool is likely to be
considerably longer than calling String.Replace, to be honest.
Well true, but what if the file is huge =)
Then do it line by line with StreamReader - in fact, as StreamReader
accepts any kind of line break, if you're happy to process a line at a
time you don't need to do anything. Otherwise, just have one
StreamReader, and one StreamWriter to write out the file with the right
line breaks, and you'll still end up with less code than setting up the
process etc, I suspect. (It'll also reduce the dependency on an extra
tool.)
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too