Combining strings in VB.NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

This is a tutorial in visual basic on string concatenation / combination in visual basic .net. Like in any other programming languages, combining strings in vb.net is an easy process to do. There are two ways of combining strings. First using the & sign and the second is the + sign. The "and" sign and the "plus" sign both can be used to connect two pieces, or variables to form a sentence. The following example shows you how to combine two variables to make one string.

Dim FirstName As String = "Dominic"
Dim LastName As String = "Alphonso"
Dim FullName As String
FullName = "My name is " & FirstName & " " & LastName
MsgBox(FullName)

visual basic .net combine strings


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.