Imports System
Public Class RemoveTest
Public Shared Sub Main()
Dim name As String = "this is a test"
Dim foundS1 As Integer = name.IndexOf(" ")
Dim foundS2 As Integer = name.IndexOf(" ", foundS1 + 1)
If foundS1 <> foundS2 And foundS1 >= 0 Then
name = name.Remove(foundS1 + 1, foundS2 - foundS1)
Console.WriteLine(name)
End If
End Sub 'Main
End Class 'RemoveTest