Program that uses Environment.NewLine: C#
using System;
class Program
{
static void Main()
{
//
// Use string concat to combine two literals
// with the newline constant.
//
string s = "First line" +
Environment.NewLine +
"Second line";
Console.Write(s);
Console.Read();
}
}
Output
First line
Second line
Saturday, September 28, 2013
NewLine in C#
Subscribe to:
Post Comments (Atom)