[2005]Simple Concatenation
VB Code:
MsgBox(tboxFirstName.Text + tboxLastName.Text + "has been deleted", MsgBoxStyle.Exclamation, "Delete")
This code outputed with the firstname and lastname stating has been delete...My question is how can I put a space between firstname and lastname as well as to the string "has been deleted"?thanks in advance....
Re: [2005]Simple Concatenation
You are joining strings together. If you want another string in between the first name and last name then just put an extra string in there: one that contains a single space. Also, if you want a space before the word "has" then just put one in the string. You've got a space after the word so why can't you put one before it?
Note that you may also want to consider using the "&" operator instead of "+". You may also like to investigate the String.Format method, which makes things much more readable when concatenating multiple strings.
Re: [2005]Simple Concatenation
You just need to add a space character!
Give this a whirl
VB Code:
MsgBox(tboxFirstName.Text & " " & tboxLastName.Text & " has been deleted", MsgBoxStyle.Exclamation, "Delete")
You might also want to consider using Windows.Forms.MessageBox.Show(..), instead of MsgBox.