![]() |
|
[VB.Net]Random Alpha-Numeric Generator - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework) +--- Thread: [VB.Net]Random Alpha-Numeric Generator (/Thread-VB-Net-Random-Alpha-Numeric-Generator) |
[VB.Net]Random Alpha-Numeric Generator - 1234hotmaster - 06-07-2011 Made by me in 5 minutes ![]() Code: Public Function R4ND0M_Generator(ByVal Length As Byte) As String
Dim RND As New Random
Dim Alpha As String() = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
Dim UpperAlpha As String() = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
Dim C7R As String
Do Until Len(C7R) >= Length
If RND.Next(1, 4) = 1 Then C7R &= Alpha(RND.Next(1, 26))
If RND.Next(1, 4) = 2 Then C7R &= UpperAlpha(RND.Next(1, 26))
If RND.Next(1, 4) = 3 Then C7R &= CStr(RND.Next(1, 10))
Loop
Return C7R
End FunctionUsage Example: Code: Messagebox.Show(R4ND0M_Generator(20))RE: [VB.Net]Random Alpha-Numeric Generator - stennis1 - 06-08-2011 well let me say as first here Nice bro
RE: [VB.Net]Random Alpha-Numeric Generator - 1234hotmaster - 06-08-2011 Thanks man finally someone saw this thread
RE: [VB.Net]Random Alpha-Numeric Generator - stennis1 - 06-12-2011 haha many people looking but there is always 1 that appreciate other peoples work. How do you call the others?? oh yeah Leechers and copy / pasters hehe Thanx again RE: [VB.Net]Random Alpha-Numeric Generator - 1234hotmaster - 06-12-2011 hate to admit but nice words :Thumbs: |