2
Answers

Enums in c# but i got a lot of errors how can i fix them?

Ask a question
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace exampleChess
{
class Program
{

  static void Main(string[] args)
{
Random random1 = new Random();
for (int i = 0; i < 3; i++)
{
enum color { black, white};
enum chess { pawn, knight, bishop, rook, king, queen};
color colors = random1.Next(0, 2);
chess pieces = random1.Next(0, 6);
Console.WriteLine(colors + " " + pieces);
}
}
}
}


Answers (2)