Declare multiline string literals
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| C# Code Snippets |
| See also |
| edit |
This C# code snippet uses two different methods of declaring multiline string literals.
string couplet1 = "Half a league, half a league,\n" + "Half a league onward,"; string couplet2 = @"All in the valley of Death Rode the six hundred.";