class Palette
{
public static void Main()
{
int array = new int [5];
if (array[] = 0)
{
Console.WriteLine("It's blue");
}
if (array[] = 1)
{
Console.WriteLine("It's Violet");
}
if (array[] = 2)
{
Console.WriteLine("It's red");
}
if (array[] = 3)
{
Console.WriteLine("It's Black");
}
if (array[] = 4)
{
Console.WriteLine("It's green");
}
Random ran = new Random();
int r = ran.Next(array.Length);
string Token = (array[r]);
Console.WriteLine(Token);
}
}
这是行不通的。我怎样才能让它工作。