dimanche 27 mars 2022

Im trying to create a Random name generator but i get error CS1525 from Instantiating a Random? [closed]

static void Main(string[] args)
{
    var guyfirstNames = new string[]
    {
           "Noah", "Parker", "Tyler", "Isaac", "Emilo", "Hugo", "Victor", "Ruben", "Aidan",
           "Ben", "Bob", "Logan", "Antonio", "Ryder", "Anthony", "Ivan", "Calvin", "Liam", "Lucas", "Braxon",
           "Elijah", "Oliver", "William", "James", "Alan", "Brian", "Bryan", "Conner", "Carter", "Cory",
           "Damian", "Damien", "Derek", "Devin", "Donovan", "Dominik", "Drake", "Dustin", "Eric", "Erick",
           "Erik", "Gary", "Gavin", "Jared", "Jason", "Jeff", "Jeffrey", "Jeremy", "Justin", "Keith", "Kevin",
           "Kyle", "Mark", "Riley", "Matthew", "Robin", "Scott", "Arthur", "Alfred", "Carl", "Curtis", "Cyrus", "Felix",
           "Frank", "Grant", "Larry", "Leroy"
    };
    Random rBoyFirstName = new Random();
    Console.WriteLine("Congratulations you were born a One in 4 trillion chance");
}

link to code https://app.codingrooms.com/w/gLIHaTVvEkwn

As in the question name I'm trying to get a random name generator but it doesn't work because i get error CS1525 on (27,8) i tried changing The Random but it doesn't work i also tried changing the name of the Random but it doesn't work i tried indenting it differently also doesn't work please help me

Note:I am not all that good at coding so some of the things i say might not make sense like changing the Random i'm not sure if that is how you say it but i don't know any other way so sorry if it's confusing.




Aucun commentaire:

Enregistrer un commentaire