I have this program generating a firstname and lastname from a file. When I run this program I enter information in three textboxes. The first two are the salary low and h
You're using a new instance of System.Random
every time. Random
is seeded by the current time.
Initializes a new instance of the Random class, using a time-dependent default seed value
Reference
Since you are creating new instances in very quick succession, they get the same seed.
Instead, you should use the same instance of Random
, possibly by making it a field and initializing as a field initializer or constructor. For example:
Public Class Form1
Private _random As New System.Random()
'Use _random in other methods.
End Class