A Password generator for VB.NET, just load this up as a console application and hit debug.
This is mainly to show/test the Rnd() function.
'*****
'Password Generator
'Jonesy44
'6 Oct 2009
'*****
Module Module1
Sub Main()
'declare variables
Dim length As Integer, pass As String
'initialize rnd() function
Randomize()
'get input values
System.Console.Write("How long do you want the password to be? ")
length = System.Console.ReadLine()
'generate password
For x As Integer = 1 To length
If Int(Rnd() * 3) = 0 Then : pass += CStr(Int(Rnd() * 9))
ElseIf Int(Rnd(0) * 3) = 1 Then : pass += Chr(Int((90 - 65 + 1) * Rnd() + 65))
Else : pass += Chr(Int((122 - 97 + 1) * Rnd() + 97))
End If
Next
'ouput generated pass
System.Console.WriteLine("{0}Generated Password {1}", vbCrLf, pass)
'halt console for user to read output
System.Console.ReadLine()
End Sub
End Module
i "ripped" that saying actually http://media.photobucket.com/image/successful%20troll%20is/Zheel/successful-troll-is-successful.jpg