Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How we can add a new line in c# [duplicate]

Tags:

c#

break

line

endl

How we can write output on second line in c# ??
How we can write the given code into two lines

MessageBox.Show("my name is " + LineBreak, "yazdan" ,
                 MessageBoxButton.OK, MessageBoxIcon.Information);

How we can start a new line after "my name is " and before "yazdan"

like image 872
Yazdan Haider Avatar asked Dec 04 '22 22:12

Yazdan Haider


1 Answers

"my name is " + "\n" + "yazdan" 

you can use either "\n" or Environment.NewLine

like image 110
Vicky S Avatar answered Dec 17 '22 21:12

Vicky S