VB.Net String Concatenation
To concatenate two strings, use either the + or & operators. The & operator implicitly converts numbers. If you use the + operator to concatenate a string and a number, you have to cast the number as a string with CStr.
Alternatively, you can use the System.Text.StringBuilder class which frequently but not always provides faster code.
Syntax Example: Dim FullName
Dim Age
//You can use + for strings.
FullName = "Prestwood"
Console.WriteLine("Hello " + FullName)
//For implicit casting, use &
Age = 35
Console.WriteLine(FullName & " is " & Age & " years old.")
'Implicit casting of numbers.
'
'This works:
MessageBox.Show(3.3)
'This fails:
'MessageBox.Show("" + 3.3)
'This works:
MessageBox.Show("" + CStr(3.3))
'Implicit casting &. This also works:
MessageBox.Show("" & 3.3)