Answers

Jan 17, 2007 - 04:50 AM
dustPuppy...
Depending on how you're creating the info that's going into the stream, there are a number of ways you can do it, including the one you've described in your question.
While it's certainly not the only option, I've grown fond of using a StringBuilder in a situation where I'm appending a bunch of stuff to write to a stream. To ensure linebreaks, I use the following code:
StringBuilder sb = new StringBuilder();
sb.Append("blah, blah, blah");
sb.Append(Environment.NewLine);
sb.Append("more blah, blah, blah");
That puts a correct "newline" into the string that gets written into the stream.
I hope this helps,
Ric
Depending on how you're creating the info that's going into the stream, there are a number of ways you can do it, including the one you've described in your question.
While it's certainly not the only option, I've grown fond of using a StringBuilder in a situation where I'm appending a bunch of stuff to write to a stream. To ensure linebreaks, I use the following code:
StringBuilder sb = new StringBuilder();
sb.Append("blah, blah, blah");
sb.Append(Environment.NewLine);
sb.Append("more blah, blah, blah");
That puts a correct "newline" into the string that gets written into the stream.
I hope this helps,
Ric

Feb 10, 2007 - 01:59 AM
thanks Ric, you here are the points...
Add New Comment