Currently using this
And when printed, each part is the same.. i.e. 505-505-505, when they should be different.
What's going on?
Code:
Public Shared Function generateRandomString(ByVal length As Integer)
Dim _allowedChars As String = "0123456789"
Dim randomNumber As New Random()
Dim chars(length - 1) As Char
Dim allowedCharCount As Integer = _allowedChars.Length
For i As Integer = 0 To length - 1
chars(i) = _allowedChars.Chars(CInt(Fix((_allowedChars.Length) * randomNumber.NextDouble())))
Next i
Return New String(chars)
End Function
Code:
Dim loginID_PART_1 As String = getMisc().generateRandomString(3)
Dim loginID_PART_2 As String = getMisc().generateRandomString(3)
Dim loginID_PART_3 As String = getMisc().generateRandomString(3)
And when printed, each part is the same.. i.e. 505-505-505, when they should be different.
What's going on?