"\n" in C#, in VB.NET ?????

Hi there!!

I want to use the equivelent of "\n" in java .. so that code will take me to the next line. i try to do this in VB and found more than one key word I found "ControlChars.NewLine" and "ControlChars.CrLf".. Can you please tell me what is the difference and which one is the right conversion of the java or C#
Thank you for reading this message

Fadil Alnassar
www.fadilalnassar.com | FREE Nodil Tab Control
http://www.mefranchising.com
0
fadil1977
11/3/2004 2:25:22 PM
πŸ“ asp.net.web-forms
πŸ“ƒ 93655 articles.
⭐ 6 followers.

πŸ’¬ 2 Replies
πŸ‘οΈβ€πŸ—¨οΈ 1095 Views


In VB.NET, vbcrlf (Carriage return line feed) should do the job.

CR is for Carriage return; the ascii \r character. Also used as a synonym for the `Return' or `Enter' key used to terminate a line of text.
LF is the line feed which directs next character to be printed or displayed on the next line.
ControlChars.NewLine is more of a generic solution in case other platform has a different new line character. A list of VB.NET constants could be found here [1].
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbgrfVBAConstantChangesInVisualBasicNET.asp

-Adnan Masood
MCSD.NET, MCAD.NET, MCP
www.DotNetSmith.com
"Beware of bugs in the above code; I have only proved it correct, not tried it" - Donald Knuth
0
adnano
11/3/2004 6:34:03 PM

            

Enviroment.NewLine

is language independent.

Regards

Andre Colbiornsen
---------------------------------
Seventh Day
RΓ₯bygatan 1A,
SE-223 61 Lund
Sweden
Mob.: +46-(0)708-97 78 79
Mail: info@seventhday.se
--------------------------------
0
adec
11/3/2004 6:39:07 PM
Reply: