-3

So my code is like this :

richtextbox1.text = x1.text + x2.text (x's are labels)

And the result is like this :

x1x2

Expected Output :

x1
x2
HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
Eren
  • 7
  • 3
  • `richtextbox1.text = x1.text & Environment.Newline & x2.text` and then read [this](http://stackoverflow.com/help/how-to-ask). – The Blue Dog May 02 '15 at 18:43

3 Answers3

0

You have to use NewLine Char to put extra line between two string.

richTextBox1.Text = string1 + System.Environment.NewLine + string2
HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
0

Hi guys I am not good at this but this worked for me: 1. declare string 1 and string 2 just before the if statement like this using Dim:

    Dim string1 = "I am teacher."
    Dim string2 = "I like my students."
    If TextBox1.Text = "write here the word that you want to search" Then
    RichTextBox1.Text = "I am teacher." + System.Environment.NewLine + "I like my students."
    End If
  • I am teacher. is an example of a paragraph1
  • I like my students. is an example of a paragraph2
    1. Now here is the if statement with the two paragraphs above:
-1

Try this

RichTextbox1.Text = x1.Text & " " &