Imports System
Public Class MainClass
Shared Sub Main()
Dim strings As String()
Dim i As Integer
Dim quotes As Char = ChrW(34)
strings = New String() {"started", "starting", _
"ended", "ending"}
Console.WriteLine(" test every string to see if it starts with 'st'")
For i = 0 To strings.GetUpperBound(0)
If strings(i).StartsWith("st") Then
Console.WriteLine(quotes & strings(i) & quotes & _
" starts with " & quotes & "st" & quotes )
End If
Next
Console.WriteLine(" test every string to see if it ends with 'ed'")
For i = 0 To strings.GetUpperBound(0)
If strings(i).EndsWith("ed") Then
Console.WriteLine( quotes & strings(i) & quotes & _
" ends with " & quotes & "ed" & quotes )
End If
Next
End Sub ' Main
End Class