using System;
using System.Linq;
public class Program
{
public static string GenerateSpecificRandomPassword(int length, string chars) {
Random rnd = new Random();
return new string(Enumerable.Repeat(chars, length)
.Select(s => s[rnd.Next(s.Length)]).ToArray());
}
public static void Main()
{
int length = 5;
string password = GenerateSpecificRandomPassword(length, "ABCDEFGhijkl!@#$&");
Console.WriteLine(password);
}
}
/*
run:
G@$DG
*/