Is there a function in VB.NET to test to see if a variable like 'WholeName' contains anyspaces in it or not? Please help fast!
Printable View
Is there a function in VB.NET to test to see if a variable like 'WholeName' contains anyspaces in it or not? Please help fast!
Use IndexOf method
VB Code:
Dim var1 As String = "A Test" Dim pos As Integer pos = var1.IndexOf(" ") If pos > 0 Then 'There is a space in the string Else 'There is not a space in the string End If
I LOVE YOU! Thanks for your help. It works perfect!