TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
reubin1108001
NA
10
0
write to file with line breaker
Jun 11 2007 3:43 AM
When I write to file using: StreamWriter sw=new StreamWriter("blah.txt"); sw.WriteLine(toFile); where toFile is the variable holding strings and there are '\n' inside to make line breaker. On the console, it has the correct format. But when I see the generated file "blah.txt". There is no line breaker. All strings go together. When I use code to read back: StreamReader sr=new StreamReader("blah.txt"); rl=sr.ReadLine(); it works well as '\n' does seperate the strings. My question is why the generated file doesn't show the correct format. Is this the txt file's problem or is this C#'s problem? Thanks
Reply
Answers (
1
)
FFA Team, need programmers
Passing subarrays as parameter