Wrox Programmer Forums
Beginning Visual Basic 2012
This is the forum to discuss the Wrox book Beginning Visual Basic 2012 by Bryan Newsome; ISBN: 978-1-118-31181-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning Visual Basic 2012 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 3rd, 2014, 11:34 PM
Authorized User
Join Date: Jun 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Concatentation

I change some code on page 58 "TRY OUT" "Concatenation"

I using two Concatenation Symbols and Quotation Symbol. The code works,
but is the code wright?

Private Sub btnConcatenation_Click(sender As Object, e As EventArgs) Handles btnConcatenation.Click

'Declare variables
Dim strResults As String
Dim strOne As String
Dim strTwo As String

'Set the string values
'This different than in the book, I did not put space before World,
'I used two Concatenation symbols
strOne = "Hello"
strTwo = "World"

'Concatenate the strings and add a space between Hello and World,
' I used two Concatenation symbols
'This is different than in the book
strResults = strOne & " " & strTwo

'Display results
MessageBox.Show(strResults, "Strings")

End Sub
End Class
Old November 4th, 2014, 05:58 PM
Wrox Author
Join Date: Mar 2006
Posts: 91
Thanks: 0
Thanked 5 Times in 5 Posts

That looks correct Frank.
Old November 4th, 2014, 10:22 PM
Authorized User
Join Date: Jun 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excellent learning tool

Thank You, for your help!

Similar Threads
Thread Thread Starter Forum Replies Last Post
String maniuplation and concatentation ehrens XSLT 2 July 6th, 2006 02:03 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.