-
MatrixNet.
User deleted
Ecco un esempio (banale) di Randomize Password in C#: CODICEusing System;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
char[]
arrcaratteri =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".ToCharArray();
int intPasswordLength = 10;
string psswdstring = null;
System.Random random = new Random();
for (int i=0; i < intPasswordLength; i++)
{
int intRandom = random.Next(arrcaratteri.Length);
psswdstring += arrcaratteri[intRandom].ToString();
}
Console.WriteLine(psswdstring);
Console.ReadLine();
}
}
}
Potete trovarlo anche qui: https://github.com/MatrixNet/RndomPsswd-CSharp. -
.
Si potrebbe semplificare. Evitando l'array prima di tutto. . -
MatrixNet.
User deleted
Già. questo è soltanto un rozzo codice.
.