public static char[] alphaChar = new char[]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
public static void Main()
Console.WriteLine(getGenString(true, true, 2, 4, "ABCD", "WXYZ"));
public static string getGenString(bool alpha, bool numerical, int chunks, int chunkSize, string prefix = "", string suffix = "")
System.Random rnd = new System.Random();
for (int i = 0; i < chunks; i++)
for (int j = 0; j < chunkSize; j++)
genString = genString + alphaChar[rnd.Next(0, alphaChar.Length)];
genString = genString + (rnd.Next(0,10)).ToString();
genString = genString + "-";
if (suffix != "") genString = genString + "-" + suffix;
return prefix + "-" + genString;