C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




how to insert new line character


Posted Date: 05 Sep 2008      Total Responses: 3

Posted By: sujatha       Member Level: Silver     Points: 1


hi
i wish to include a new line character in C#
please find soln and give me soon




Responses

Author: Geetha    05 Sep 2008Member Level: GoldRating:     Points: 2
using c# i am writing in a file. here i am using the new line character.

FileStream fs = new FileStream(@"d:\Temp\Test.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter m_streamWriter = new StreamWriter(fs);
m_streamWriter.BaseStream.Seek(0, SeekOrigin.End);
m_streamWriter.WriteLine(DateTime.Now + " " + Message);
m_streamWriter.WriteLine("\n ---------------------------------------------------------------------");
m_streamWriter.Flush();
m_streamWriter.Close();
fs.Dispose();
m_streamWriter.Dispose();


Author: ANIL PANDEY    05 Sep 2008Member Level: DiamondRating:     Points: 3
hi,

u can use the char(13) to insert the new line character in the string.

Char(13) represent the Enter key in the code..


Thanks



Author: Kapil Deo Malhotra    05 Sep 2008Member Level: GoldRating:     Points: 3
Hi,

You can use "\n" also for the new line character.

Hope that helps



Post Reply
You must Sign In to post a response.
Next : How to send message remotely from windows mobile application to port in c#.net.
Previous : Master page problem
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use