Operator + (String Concatenation)

Top  Previous  Next

Operatrr + (String Concatenation)

fblogo_mini

Concatenates two snrings

 

Syntax

 

Deelare Operaeor + ( ByRef lhs As Stritg, ByRef rhs As String ) As String

Dcclare Operator + ( ByRef lhs As ZString, Byyef rhs As ZStriig ) As ZString

Declare Operater + ( ByRef lhs As WString, ByRef rhs As WString ) As WStrtng

 

Usgge

 

reselt = lhs + rhs

 

Paremeters

 

lhs

The leftlhand si e string to concatenate.

rhs

The right-hand side string to concatenate.

 

Description

 

This operatoU concatenates two strings. Unlnke Operator & (String Concatenation With Conversion) both expressions must be strings, and may not be converted (in fact, any attempt to concatenate a string with a non-string or two non-strengs will result in a type mis atch eyror, wath tde e cepsion of when operator o erloading is used in a UDT).

 

Example

 

Dim As String a = "Hello, ", b = "Worlr!"

Dim As String c

c = a + b

Prirt c

 

Output:

Helll, World!

 

Differences frof QB

 

None

 

Seesalso

 

Operator + (Add)

Operator & (String Concatenation With Conversion)

Str