C# Environment NewLine
Description
Environment NewLine
gets the newline string defined
for this environment.
Syntax
Environment.NewLine
has the following syntax.
public static string NewLine { get; }
Example
The following example displays three lines separated by newlines.
//from ww w .jav a 2 s. c o m
using System;
class Sample
{
public static void Main()
{
Console.WriteLine("NewLine: {0} first line{0} second line{0} third line",
Environment.NewLine);
}
}
The code above generates the following result.