Private Function RndString(Optional ByVal sLen As Integer = 15) As String
Dim r As String = ""
Dim i As Integer
Randomize()
For i = 1 To sLen
Randomize(Int((57 - 48 + 1) * Rnd() + 48))
Randomize()
If Int(2 * Rnd() + 1) = 1 Then
r = r + Chr(Int((57 - 48 + 1) * Rnd() + 48))
Else
r = r + Chr(Int((90 - 65 + 1) * Rnd() + 65))
End If
Next i
Return r
End Function
Please SUBSCRIBE to get new articles directly into your Email inbox!
Dim r As String = ""
Dim i As Integer
Randomize()
For i = 1 To sLen
Randomize(Int((57 - 48 + 1) * Rnd() + 48))
Randomize()
If Int(2 * Rnd() + 1) = 1 Then
r = r + Chr(Int((57 - 48 + 1) * Rnd() + 48))
Else
r = r + Chr(Int((90 - 65 + 1) * Rnd() + 65))
End If
Next i
Return r
End Function
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق