Concatenates a String expression to a String variable and assigns the result to the variable.
variable &= expression
Parts
- variable
- Required. Any String variable.
- expression
- Required. Any String expression.
Example
The following example uses the &= operator to concatenate two String variables and assign the result to the first variable.
Dim var1 As String = "Hello "
Dim var2 As String = "World!"
var1 &= var2 ' The value of var1 is now "Hello World!"
See Also
& Operator | *= Operator | += Operator | -= Operator | /= Operator | = Operator | \= Operator | ^= Operator | Assignment Operators | Concatenation Operators | Operator Precedence in Visual Basic | Operators Listed by Functionality