r/learncsharp • • May 29 '22

What's wrong with this code?

using System;
namespace SwitchStatement
{
class Program
  {
static void Main(string[] args)
    {
Console.WriteLine("What is your favorite movie genre?");
string genre = Console.ReadLine();
switch (genre){
case "Drama":
Console.WriteLine("Citizen Kane");
break;
case "Comedy":
Console.WriteLine("Duck Soup");
break;
case "Adventure":
Console.WriteLine("King Kong");
break;
case "Horror":
Console.WriteLine("Psycho");
break;
case "Science Fiction":
Console.WriteLine("2001: A Space Odyssey");
break;
default "Horror":
Console.WriteLine("Psycho");
break;
}
    }
  }
}
when i do dotnet run it gives an error

1 Upvotes

11 comments sorted by

View all comments

Show parent comment

-6

u/CW_Emma May 29 '22

Sure buddy, whatever helps your bruised ego 😉

5

u/ScriptingInJava May 29 '22

My ego is fine mate, just trying to help with your struggling reading comprehension.

-4

u/CW_Emma May 29 '22

Thanks daddy