c# new line code example

Example 1: c# string newline

string text = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@";

text = text.Replace("@", "@" + System.Environment.NewLine);

Example 2: new line console c#

//You can use "\n" to jump to next line
//Example:
Console.WriteLine("Line #1 \n Line #2 \n\n\n Line #5");
Console.Write("Still on Line #5");
Console.WriteLine("Line #6");

Example 3: console writeline new line c#

Console.WriteLine("This is a line");
Console.WriteLine();
Console.WriteLine("This is another line");