Using variables at runtime and using concatenation

Asked By 60 points N/A Posted on -
qa-featured

Hello!

I want to know what is the meaning of concatenation? What is the difference between integer and string data types? I would like to create a program in VB 2015 that will display the value of textbox and adding like Hello your name is—“ What are the controls I need to use to make this program work? What are the properties that I need to change at runtime to make it work? For the command, what are the declarations I need to provide to make this run successfully? Thank you!

SHARE
Answered By 0 points N/A #174664

Using variables at runtime and using concatenation

qa-featured

Hello Mellisa!

Concatenation is a word in computer programming meaning combining two entities or objects. This done by using “&” symbol and or “+” symbol. In this program you just need few controls.

1.  Form

2.  1 Textbox – name property set to “strName”

3.  1 Command button

Sample output window is shown below.

Codes:

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        MsgBox("Hello " & strName.Text & " , welcome to Visual Basic.")

    End Sub

End Class

Explanations: In line number 5, it will show a message box with the message “Hello <name entered>, welcome to Visual Basic.” It is simple and very-near human explanation. If you’re going to read it using human language – display a message box that will show “hello” concatenated with value of strName.Text and “welcome to Visual basic.”

Login/Register to Answer

Related Questions