-1
我想從字符串列表中生成一個字符串。我這樣做,但它只能顯示陣列數量:字符串列表中的隨機字符串
Random r1 = new Random();
string[] fruits = new string[7];
fruits[0] = "cherry";
fruits[1] = "blueberry";
fruits[2] = "banana";
fruits[3] = "melon";
fruits[4] = "apple";
fruits[5] = "pear";
fruits[6] = "watermelon";
Console.WriteLine(r1.Next(fruits.Length));