Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Environment.NewLine
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00940829
Message ID:
00941259
Vues:
19
>Thanks for the reply and thanks for taking the time to answer such a relative simple question. The reason I asked was that I was still left qith a question mark in my head after reading the MSDN entry for Environment.NewLine.
>I seem to remember when programming C in Linux many moons ago I was using "\n" and "\r\n" so unless things have changed Linux uses "\r\n" also.
>It is just so much more easy to write "\r\n" instead of using Environment.NewLine (even with intellisense) :)
>
>Again thanks for replying

I wouldn't worry about it. As you point out most environments use the same sequence and just about everything understands what \r\n outputs.

+++ Rick ---

>
>Einar
>
>>>Is there a benefit of using Environment.NewLine instead of "\n" or "\r\n" directly in my string?
>>>Einar
>>
>> In theory yes. If you run .NET on a non-Windows box the line feed carriage return combination maybe different and this is meant to remedy that.
>>
>>In reallity that's highly unlikely and even if you do most platforms these days use \r\n for linefeed newline combinations.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform