what is vbCrlf

back in the good old typewriter days you used to have a trigger that could perform a

carriage return

and a

line feed.

hence crlf.


the trigger could also do a linefeed without a carriage return.
 
thanks to everyone who replied........very helpfull im new to this forum and of course vb.net environment i think this forum is da bomb................thank u mutant,Heiko and AndreRyan. thanks guys !!

next time i know where to ask some toughies! hehehehe
 
What is the advantages or different between "vbCrLf" and "System.Environment.NewLine()"???

Any references of it?

TQ
 
There is no real difference, except that vbCrlf is not a .net framework object. You will get the same thing no matter which one you use.
 
Besides the result is same, we also need to consider the performance or furture maintenance, since you said "vbCrLf" is not .NET Framework object, then we should use System.Environment.NewLine()?

In "NET Framework Class Library" there is not further explanation for either "vbCrLf" or "System.Environment.NewLine()", is there anyway I can find more information about it? Just curious about the different between both method....
 
bCrlf will not lower your apps performance.
http://www.zdnet.com.au/builder/dotnet/story/0,2000042147,20269716,00.htm
Quote from this website:
Also, this library provides access to common environment constants that VB developers have learned to use like vbCrLf. You create the same constants by using either the System.Environment.Newline method or System.Convert.ToChar(13) & System.Convert.ToChar(10). Constants like vbCrLf map directly to underlying framework calls and should have no impact on the performance. In the case of vbCrLf, the compiler optimises it to a single string; if it is a variable, it maps directly to \r\n, which translates to a carriage return. Using statements that map directly to underlying framework calls like msgbox, which maps directly to the .NET Framework MessageBox, have little or no effect on performance since the underlying IL will be basically the same.
 
A newline character on Windows is a carriage return plus a linefeed. Hence the System.Environment.Newline constant. If someone ports the framework to some other platform, a newline character may only be a carriage return or a linefeed on its own. vbCrLf will always be both.

Having said that, anyone who ports the framework will almost undoubtedly be trying to be compatible with the Windows one, so theyll leave it as a carriage return and linefeed.
 
You mean other platform will use either "vbCr" or "vbLf"? so if I use "vbCrLf", I will have problem? except in windows environment?

So, you suggest use "System.Environment.NewLine()"?
 
Back
Top