我正在尝试制作一些将生成随机数的代码,然后检查文本文件中每一行的数字以查看是否已经生成。除了检查文本文件中生成的数字的代码外,我什么都有。有任何想法吗?
这是我到目前为止的代码:
Dim Rlo As New IO.StreamReader("C:\Users\Somebody\Documents\Visual Studio 2012\Projects\RobloxRecruitV1\RobloxRecruitV1\bin\Debug\" & TheFileName.Text & ".txt")
Dim firstLine As String
'read first line
firstLine = Rlo.ReadLine()
'read secondline
TheText.Text = Rlo.ReadLine()
rndnumber = New Random
number = rndnumber.Next(firstLine, TheText.Text)
TextBox1.Text = number.ToString