applications.
M S Herfried K. Wagner
Post by Morten Wennevik [C# MVP]I suppose using \r\n ([CR][LF]) may break functionality if you run the code
on non windows operating systems, which is why you really should use
Environment.Newline instead. I expect winforms and its controls to
internally use Environment.Newline and according to the docs this will
translate to \n [LF] on unix and \r\n ([CR][LF]) on non unix operating
systems. So, if compiled and run on Unix, winforms/controls should use \n
([LF]). Then again, to complicate matters further, the characters \r and \n
may not even exist on all operating systems and are not guaranteed to mean
[CR] and [LF]
http://en.wikipedia.org/wiki/Newline
--
Happy Coding!
Morten Wennevik [C# MVP]
Select Text and click on the drop down arrow at right end
now type first line and press Enter
then type 2nd line and press Enter
follow the above steps
label2.Text = "Line1\r\nLine 2";
or,
label3.Text = "L3 Line 1" + Environment.NewLine + "L3 Line 2";
or,
label4.Text = "L4Line 1 \n L4Line 2";
Select Text and click on the drop down arrow at right end
now type first line and press Enter
then type 2nd line and press Enter
follow the above steps
label2.Text = "Line1\r\nLine 2";
or,
label3.Text = "L3 Line 1" + Environment.NewLine + "L3 Line 2";
or,
label4.Text = "L4Line 1 \n L4Line 2";
Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET HttpPostedFile Image Resizer
http://www.eggheadcafe.com/tutorials/aspnet/ba8d2418-6d67-40f7-989c-e90688058778/aspnet-httppostedfile-image-resizer.aspx