public static string CreatePassword()
{
int length = 8;
string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
string res = "";
Random rnd = new Random();
while (0 < length--)
res += valid[rnd.Next(valid.Length)];
return res;
}
{
int length = 8;
string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
string res = "";
Random rnd = new Random();
while (0 < length--)
res += valid[rnd.Next(valid.Length)];
return res;
}
No comments:
Post a Comment