Random rndfruits = new Random(); string[] fruits = new string[] { "apple", "mango", "papaya", "banana", "guava", "pineapple" }; Console.WriteLine(fruits[rndfruits.Next(0,fruits.Length)]);