I want to create a random number generator in VB.NET But from my own given list of numbers
Like Chose random numbers fro
Already built into .NET base of 'Random' and then extending that into your existing choices. This is NOT the same as generating the number from a Random as you are specifying YOUR OWN list first and then merely getting positioning with the help of a new Rand and using your length as a ceiling for it.
Sub Main()
'Say you have four items in your list
Dim ls = New List(Of Integer)({1, 4, 8, 20})
'I can find the 'position' of where the count of my array could be
Dim rand = New Random().Next(0, ls.Count)
'This will give a different 'position' every time.
Console.WriteLine(ls(rand))
Console.ReadLine()
End Sub