monkmasterflex Posted June 6, 2003 Posted June 6, 2003 if i mod 5 = 0 then output & = vbCrlf end if next 'what the hell is vbCrlf ? Quote
*Experts* mutant Posted June 6, 2003 *Experts* Posted June 6, 2003 Its a newline constant. It puts a new line in whatever you use it in that can have it. Quote
Heiko Posted June 6, 2003 Posted June 6, 2003 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. Quote .nerd
AndreRyan Posted June 6, 2003 Posted June 6, 2003 The recommended .Net version though is System.Environment.NewLine() Quote .Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
monkmasterflex Posted June 6, 2003 Author Posted June 6, 2003 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 Quote
bungpeng Posted June 9, 2003 Posted June 9, 2003 What is the advantages or different between "vbCrLf" and "System.Environment.NewLine()"??? Any references of it? TQ Quote
*Experts* mutant Posted June 9, 2003 *Experts* Posted June 9, 2003 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. Quote
bungpeng Posted June 9, 2003 Posted June 9, 2003 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.... Quote
*Experts* mutant Posted June 9, 2003 *Experts* Posted June 9, 2003 bCrlf will not lower your app's 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. Quote
*Gurus* divil Posted June 9, 2003 *Gurus* Posted June 9, 2003 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 they'll leave it as a carriage return and linefeed. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
bungpeng Posted June 10, 2003 Posted June 10, 2003 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()"? Quote
*Experts* mutant Posted June 10, 2003 *Experts* Posted June 10, 2003 Right now its only Windows environment :) Yes, you should use the NewLine(). Quote
San_dev Posted November 9, 2009 Posted November 9, 2009 Hi all, can anyone tell me what exactly is vbCrlf(detail) with an easy example.I'm a fresher and learning. thanks in advance... Quote
Leaders snarfblam Posted November 9, 2009 Leaders Posted November 9, 2009 This is already explained in this thread that you are grave-digging. If you have a more specific question, such as "what is a linefeed?" by all means, ask, but in a new thread please. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.