Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: Sensing data entry Pin
Ennis Ray Lynch, Jr.18-Feb-10 5:43
Ennis Ray Lynch, Jr.18-Feb-10 5:43 
QuestionProblems with Exchange WebService API Pin
DotNetCoderJunior18-Feb-10 3:34
DotNetCoderJunior18-Feb-10 3:34 
AnswerRe: Problems with Exchange WebService API Pin
DotNetCoderJunior21-Feb-10 22:07
DotNetCoderJunior21-Feb-10 22:07 
QuestionProblems showing another form when user activates the main form Pin
TheFoZ18-Feb-10 3:32
TheFoZ18-Feb-10 3:32 
AnswerRe: Problems showing another form when user activates the main form Pin
1.21 Gigawatts18-Feb-10 3:39
1.21 Gigawatts18-Feb-10 3:39 
GeneralRe: Problems showing another form when user activates the main form Pin
TheFoZ18-Feb-10 3:42
TheFoZ18-Feb-10 3:42 
QuestionFile I/O - New Line Character Pin
1.21 Gigawatts18-Feb-10 2:45
1.21 Gigawatts18-Feb-10 2:45 
AnswerRe: File I/O - New Line Character Pin
Luc Pattyn18-Feb-10 2:58
sitebuilderLuc Pattyn18-Feb-10 2:58 
Hi,

here are some facts that should help you out:
- Environment.NewLine (read-only) holds the line terminator used on your system; you can't change it;
- StringBuilder.AppendLine relies on Environment.NewLine;
- TextWriter is an output text stream that has a NewLine property, which you can set;
- TextReader is an input text stream that is tolerant to all kinds of line terminators (but doesn't tell you which ones it sees).

So you probably should read your file with TextReader, write the new one with TextWriter, and not just rely on StringBuilder. AFAIK the text streams are buffered, so going through a StringBuilder isn't paying off, just do TextWriter.Write instead of StringBuilder.Append

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.

GeneralRe: File I/O - New Line Character Pin
1.21 Gigawatts18-Feb-10 3:07
1.21 Gigawatts18-Feb-10 3:07 
GeneralRe: File I/O - New Line Character Pin
Luc Pattyn18-Feb-10 3:12
sitebuilderLuc Pattyn18-Feb-10 3:12 
GeneralRe: File I/O - New Line Character Pin
1.21 Gigawatts18-Feb-10 3:16
1.21 Gigawatts18-Feb-10 3:16 
GeneralRe: File I/O - New Line Character Pin
Luc Pattyn18-Feb-10 3:28
sitebuilderLuc Pattyn18-Feb-10 3:28 
GeneralRe: File I/O - New Line Character Pin
1.21 Gigawatts18-Feb-10 3:31
1.21 Gigawatts18-Feb-10 3:31 
AnswerRe: File I/O - New Line Character Pin
Luc Pattyn18-Feb-10 3:38
sitebuilderLuc Pattyn18-Feb-10 3:38 
GeneralRe: File I/O - New Line Character Pin
1.21 Gigawatts18-Feb-10 3:40
1.21 Gigawatts18-Feb-10 3:40 
GeneralRe: File I/O - New Line Character Pin
harold aptroot18-Feb-10 3:42
harold aptroot18-Feb-10 3:42 
GeneralRe: File I/O - New Line Character Pin
ragnaroknrol18-Feb-10 3:46
ragnaroknrol18-Feb-10 3:46 
GeneralRe: File I/O - New Line Character Pin
1.21 Gigawatts18-Feb-10 3:49
1.21 Gigawatts18-Feb-10 3:49 
GeneralRe: File I/O - New Line Character Pin
ragnaroknrol18-Feb-10 4:08
ragnaroknrol18-Feb-10 4:08 
AnswerRe: File I/O - New Line Character Pin
Gideon Engelberth18-Feb-10 16:08
Gideon Engelberth18-Feb-10 16:08 
GeneralRe: File I/O - New Line Character Pin
1.21 Gigawatts18-Feb-10 21:37
1.21 Gigawatts18-Feb-10 21:37 
Questioninstallation prerequisites Pin
Ryan Minor18-Feb-10 2:17
Ryan Minor18-Feb-10 2:17 
QuestionImage Scroll Pin
VCsamir18-Feb-10 2:10
VCsamir18-Feb-10 2:10 
Questionprint orders from different places Pin
jogisarge18-Feb-10 1:51
jogisarge18-Feb-10 1:51 
QuestionLoose coupling Pin
Mogamboo_Khush_Hua18-Feb-10 1:51
Mogamboo_Khush_Hua18-Feb-10 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.