public enum RestaurantType
Console.WriteLine($"{DishName} {DishCusines} has {Ratings} stars and it is {RestaurantType}");
Console.Write("DishNames: ");
dish.DishName = Console.ReadLine();
Console.Write("DishCusines: ");
dish.DishCusines = Console.ReadLine();
Console.Write("Ratings: ");
dish.Ratings = (Console.ReadLine());
Console.Write("RestaurantType: ");
dish.RestaurantType = Enum.Parse<RestaurantType>(Console.ReadLine());
public string DishName {get; set;}
public string DishCusines { get; set; }
public string Ratings { get; set; }
public RestaurantType RestaurantType { get; set; }
public static void Main(string[] args)
const int maxDishes = 10;
Dish[] dishes = new Dish[maxDishes];
string[] dishNames = new string[maxDishes];
string[] dishCuisines = new string[maxDishes];
string[] ratings = new string[maxDishes];
RestaurantType[] restaurantTypes = new RestaurantType[maxDishes];
if (dishcount >= maxDishes) throw new Exception();
dish.DishName = "Alfredo Pasta";
dish.DishCusines = "Italain";
dish.RestaurantType = RestaurantType.Veg;
dishes[dishcount++] = dish;
if (dishcount >= maxDishes) throw new Exception();
dish.DishName = "Chicken Pizza";
dish.DishCusines = "Italain";
dish.RestaurantType = RestaurantType.NonVeg;
dishes[dishcount++] = dish;
if (dishcount >= maxDishes) throw new Exception();
dish.DishName = "Fish Tacos";
dish.DishCusines = "Mexican";
dish.RestaurantType = RestaurantType.NonVeg;
dishes[dishcount++] = dish;
if (dishcount >= maxDishes) throw new Exception();
dish.DishName = "Hot dog";
dish.DishCusines = "American";
dish.RestaurantType = RestaurantType.NonVeg;
dishes[dishcount++] = dish;
for (var i = 0; i < dishcount; i++)
Console.WriteLine("Please enter a new dish info");
dishes[dishcount++] = dish;
if (dishcount >= maxDishes)
Console.WriteLine("No more Dishes can be added");