'返回8位小写字母数字混合随机密码
Function GetRandomPassword() As String
Dim s As String() = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "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 r As New Random
Return s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString()
End Function
本文地址:http://com.8s8s.com/it/it43899.htm