This example demonstrates two ways of constructing a multiline string literal.
string myString1 = "This is the first line of my string.\n" + "This is the second line of my string.\n" + "This is the third line of the string.\n"; string myString2 = @"This is the first line of my string. This is the second line of my string. This is the third line of the string.";
Copy the code and paste it into the Main method of a console application.
>string | General Language Example Topics.