Lately I was googling for the shortest and simplest way of generating some random passwords. So here we go. I’ll share with you what I found and how I applied them.
Public Function GenerateRandomPassword(ByVal length as Integer) as String
Dim strGuid as String = System.Guid.NewGuid().ToString()
strGuid= strGuid.Replace(“-”, String.Empty)
Return strGuid.Substring(0, length)