using System.Globalization;
public class GlobalRandom
public static void Main()
CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.UserCustomCulture |
CultureTypes.SpecificCultures);
foreach (var ci in cultures)
if ((ci.CultureTypes & CultureTypes.UserCustomCulture) == CultureTypes.UserCustomCulture)
Random rnd = new Random();
int index = rnd.Next(ctr);
int index2 = rnd.Next(0, ctr);
string[] Width = { "1024", "768", "1200", "1440", "1640",
"2160", "2160", "864", "1450", "1600", "1080" };
string[] Hight = { "1280", "1366", "1600", "1920",
"2560", "3440", "3840", "4080",
int WIndex = rnd.Next(Width.Length);
int HIndex = rnd.Next(Hight.Length);
string name = cultures[index2].ToString();
int foundS1 = name.IndexOf("-", + 1);
name = name.Remove(foundS1);
Console.WriteLine("--window-size={0},{1} --lang={2},{3}", Width[WIndex],Hight[HIndex],cultures[index],name);