|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
vbNewLine or ControlChars.NewLineNeither are more efficient as they are both constants.
But ... Environment.NewLine is more correct as it represents whatever a newline actually is on the machine/OS where the program is executing. Show quoteHide quote "Lou" <lou.gar***@comcast.net> wrote in message news:OXzbB%23KLIHA.5764@TK2MSFTNGP06.phx.gbl... > Which is more efficient? > -Lou > cool!
Thanks. Show quoteHide quote "Stephany Young" <noone@localhost> wrote in message news:%2330yWmLLIHA.3940@TK2MSFTNGP05.phx.gbl... > Neither are more efficient as they are both constants. > > But ... > > Environment.NewLine > > is more correct as it represents whatever a newline actually is on the > machine/OS where the program is executing. > > > > "Lou" <lou.gar***@comcast.net> wrote in message > news:OXzbB%23KLIHA.5764@TK2MSFTNGP06.phx.gbl... >> Which is more efficient? >> -Lou >> > "Stephany Young" <noone@localhost> schrieb: I don't think it is "more correct" in general. Which one is more correct > Neither are more efficient as they are both constants. > > But ... > > Environment.NewLine > > is more correct as it represents whatever a newline actually is on the > machine/OS where the program is executing. depends on the exact scenario. Would you expect a Windows Forms implementation for UNIX use CR+LF as Windows does or would you expect it to use the system's "native" new line sequence? Note that data displayed in controls, for example, can be loaded from resources too. Changing the new line character sequence based on the system would make porting applications between different operating systems harder. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
How do you use GetProperty.SetValue with the index parameter?
EventHandler for late-bound COM object name parser How to check a string to see that it is a valid file name file size on disk How to change the name of multiple textboxes CD Burning with VB.NET format number including + or - sign Opening Folder Browse Dialog On Client Side Silly syntactic question |
|||||||||||||||||||||||