[VB.Net]Random Alpha-Numeric Generator 06-07-2011, 09:22 PM
#1
Made by me in 5 minutes 
Usage Example:

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 Function
Usage Example:
Code:
Messagebox.Show(R4ND0M_Generator(20))
Pierce the life fibers with your drill.