using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Generate_Randon_password
{
class Program
{
static void Main(string[] args)
{
int myLength = myRandom.Next(6, 10);
while (myPassword.Length
{
int myPick = myRandom.Next(1, 3);
if (myPick == 1)
{
// Add a random number to the string.
myPassword += (char)myRandom.Next(48, 57);
}
else if (myPick == 2)
{
// Add a random lower case letter to the string.
myPassword += (char)myRandom.Next(97, 122);
}
else if (myPick == 3)
{
// Add a random upper case letter to the string.
myPassword += (char)myRandom.Next(65, 90);
}
}
Console.WriteLine("Your Random PassWord is : "+myPassword.ToString());
Console.ReadKey();
}
}
}
This post first appeared on Dot Net Tutorial For Beginners With Examples, please read the originial post: here