Two ways:

        Like in perl you can use \n, except for in Windows new lines are
always carriage returns & line feeds, so you need to use \r\n.

The other way is to use C#'s literal strings and do:

        @"My String

My String Continues here"

And it'll catch the carriage returns. 

-----Original Message-----
From: Christopher Slowik [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, April 25, 2002 4:38 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Inserting line feed into string with c#

Hi,

I'm using c# and am trying to figure out how to insert a line feed into
a string variable.  Like in perl you would use a \n. I can't seem to
find how to use ascii characters.  TIA  

-Chris

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to