In my program, the user must fill in he's first and last name in a textbox. When he don't enters he's whole name, a messagebox must appear with: "Fill in your whole name." I know it's something with:
Dim words As String() = textbox1.text.Split(" ")
Can someone help me please?
Best How To :
You want to use
String.Split, something like this,
Dim valid = textBox1.Text.Split( _
" ", _
StringSplitOptions.RemoveEmptyEntries).Length > 1
but, your question shows you haven't really thought this through. Checking that you have a space surrounded by non-space characters doesn't really validate the text as a name.