TextBox for multiple lines of text strings

F

Fir5tSight

Hi,

I have a TextBox, textAddress, that's defined as an array of text
strings.

Currently I only have a single line of text in it:

textAddress.Text = "100 America Avenue, New York, NY
12300";

However, I want to add another line for a name, such as "Mr. John
McAdams". I guess I'll need to create an array that contains both
strings (name and address). How can I get both strings displayed on
separate lines in textAddress in C# code?

Thanks!

-Emily
 
G

Guest

In c# the string "\r\n" is equal to VB's vbCrLf

That steps any line of text to the next line. O, and don't forget to set the
multiline proporty on your text box.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top