473,394 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

NewLine, ListSeparator,...


Does anybody know why the "NewLine" object is in "Environment" and not in
"System.Globalization.CultureInfo.CurrentCulture.T extInfo" like the
"ListSeparator" ???
Steph.


Aug 31 '06 #1
2 2594
Environment class provides information about the current platform/OS. Since
the new-line character (NewLine property) is OS-specific it is part of the
Environment type. In UNIX new line is represented by \n and in Windows it is
\r\n

"TheSteph" <Th******@NoSpam.comwrote in message
news:ue**************@TK2MSFTNGP04.phx.gbl...

Does anybody know why the "NewLine" object is in "Environment" and not in
"System.Globalization.CultureInfo.CurrentCulture.T extInfo" like the
"ListSeparator" ???
Steph.


Aug 31 '06 #2
I believe because the newline character is not culture specific. Regardless
of the languge used by Windows it uses the pair \r\n for a new line, where
Unix/Linux uses single \n for that. So this is related to the OS not to the
culture.
--
HTH
Stoitcho Goutsev (100)

"TheSteph" <Th******@NoSpam.comwrote in message
news:ue**************@TK2MSFTNGP04.phx.gbl...
>
Does anybody know why the "NewLine" object is in "Environment" and not in
"System.Globalization.CultureInfo.CurrentCulture.T extInfo" like the
"ListSeparator" ???
Steph.


Aug 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: S. Staats | last post by:
Good day, everbody. Here is a simple program called test.py: #!/usr/bin/python print "No newline, please.", # End of program Here is what program does: prompt> ./test.py No newline, please.
9
by: Alan Mackenzie | last post by:
To all those who use (X)Emacs's CC Mode to edit C, C++, Java, Objective-C, Pike, AWK or IDL: To help direct the development of CC Mode, it would be useful to find out how people use the...
5
by: Vamsi | last post by:
Hi, I am trying a basic opearation of splitting a multiline value to an array of single lines(Actually making Address into AddressLine1, AddressLine2). I used Environment.NewLine in split, I...
29
by: runningdog | last post by:
Hi, I would like to be able to embed a newline in a text string. Is there any convienent notation to do this TIA Steve
7
by: Alex Nordhus | last post by:
I am looking for a way to strip the blank line and the empty newline at the end of the text file. I can get the blank lines removed from the file but it always leaves the end line (which is blank)...
4
by: Peter Kirk | last post by:
Hi I would like to ask a little bit about the value Environment.Newline: what is it and what is the point of it? Ok, I can see in the docs that it represents "newline" for the current platform -...
5
by: Adam Right | last post by:
Hi, Is there a way to construct the mail body including newline characters by using .net framework mailing functions when sending an email? I cannot insert newline character into the body of the...
11
by: rossum | last post by:
I want to declare a const multi-line string inside a method, and I am having some problems using Environment.NewLine. I started out with: class foo { public void PrintStuff() { const...
1
by: linq936 | last post by:
Hi, I read in many places that the string to be outputted by printf() must be ending with newline, for example, it should be printf("Hello World.\n"); instead of printf("Hello World.");
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.