title: Random number generator check not working
body: <p>Here is my code, I'm getting combinations that contain the same number more than once so they check isn't working. I need it to get the combination 1,2,3,4 in any order. thanks for any help.</p>
  
  <pre><code>Dim RdmPlace(3) As String
  Dim i As Integer = 0
  Private Sub Rnd_Btn_Click(sender As Object, e As EventArgs) Handles Rnd_Btn.Click   
      For Count As Integer = 1 To 4
          GetRandom()
          i = i + 1
      Next
      Entry1_Txt.Text = RdmPlace(0)
      Entry2_Txt.Text = RdmPlace(1)
      Entry3_Txt.Text = RdmPlace(2)
      Entry4_Txt.Text = RdmPlace(3)
  End Sub
  Sub GetRandom()
      Randomize()
      Dim check As Integer = 1
      Dim RndValue As Integer = CInt(Int((4 * Rnd()) + 1))
      For Each value As Integer In RdmPlace
          If value = RndValue Then
              GetRandom()
          End If
      Next
      RdmPlace(i) = RndValue
  End Sub
  
  Private Sub Reset_Btn_Click(sender As Object, e As EventArgs) Handles Reset_Btn.Click
      Entry1_Txt.Text = Nothing
      Entry2_Txt.Text = Nothing
      Entry3_Txt.Text = Nothing
      Entry4_Txt.Text = Nothing
      i = 0
      For clear As Integer = 0 To 3
          RdmPlace(clear) = Nothing
      Next
  End Sub
  </code></pre>