Imports System.Collections.Generic
Dim lstWords as New List(Of String)()
lstWords.Add("Dragon Fruit")
lstWords.Add("Elderberry")
lstWords.Add("GrapeFruit")
Dim intMaxIndex = lstWords.Count()-1
Dim strWordtoFind as String
Console.WriteLine("Enter word to find")
strWordtoFind = Console.ReadLine()
DO WHILE blnWordFound = False AND intMinIndex <= intMaxIndex
intIndex = (intMinIndex + intMaxIndex) /2
Console.WriteLine("Inspecting index " & intIndex )
IF strWordtoFind = lstWords( intIndex ) THEN
Console.WriteLine( strWordtoFind & " is word no " & intIndex + 1 & " in the list")
ELSEIF strWordtoFind < lstWords ( intIndex ) THEN
intMaxIndex = ( intIndex - 1 )
intMinIndex = ( intIndex + 1)