Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

C#: Inserting New Line In Multiline Textbox

DZone's Guide to

C#: Inserting New Line In Multiline Textbox

·
Free Resource
// Ref: http://www.geekpedia.com/Question19_How-can-I-insert-a-new-line-in-a-TextBox.html
// Make sure MultiLine property is true and use "\r\n"


  TextBox1.Text = "First line\r\nSecond line";
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}