Advertisement
ZeekoSec

RndStr not working yet

Apr 9th, 2015
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     Public Function RndStr()
  2.         Dim s As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
  3.         Dim r As New Random
  4.         Dim sb As New StringBuilder
  5.         For i As Integer = 1 To 8
  6.             Dim idx As Integer = r.Next(0, 35)
  7.             sb.Append(s.Substring(idx, 1))
  8.         Next
  9.         Return (sb.ToString())
  10.     End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement