Visual Basic .NET/String and character operators

From Wikibooks, the open-content textbooks collection

< Visual Basic .NET
Jump to: navigation, search

[edit] String Operator

[edit] String concatenation

The "&" operator joins two strings together. Example:

Dim String1 As String = "123"
Dim String2 As String = "456"
Dim String3 As String
String3 = String1 & String2 ' Results in "123456".

This will result in String3 being equal to "123456"

The "+" operator may be used in place of "&". However, it is not recommended.

Personal tools
Create a book
  • Add wiki page
  • Collections help