Imports System
Public Class Test
Public Shared Sub Main()
Dim s As String = "vb.net javascript php c c++ python c#"
Dim first_word As String
first_word = if ((s.IndexOf(" ") > -1), s.Substring(0, s.IndexOf(" ")), s)
Console.Write(first_word)
End Sub
End Class
' run:
'
' vb.net
'