TextBox for multiple lines of text strings

  • Thread starter Thread starter Fir5tSight
  • Start date Start date
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
 
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
 
Back
Top