The below program will do so
Imports System.IO
Imports System.Linq
Namespace ConsoleApplication1
Class Program
Private Shared Sub Main(args As String())
Dim fileName As String = "D:\Input.txt"
Console.WriteLine(File.ReadLines(fileName).ToList()(GetRandomNumbers(1, 20)))
Console.ReadKey()
End Sub
'generate random numbers
Private Shared ReadOnly random As New Random()
Private Shared ReadOnly [syncLock] As New Object()
Private Shared Function GetRandomNumbers(minVal As Integer, maxVal As Integer) As Integer
SyncLock [syncLock]
Return random.[Next](minVal, maxVal)
End SyncLock
End Function
End Class
End Namespace