here is my code can anyone please tell me what should i put to convert the user input string so it could go through a check by switch statement i am stuck here
static void Main(string[] args)
{
Console.WriteLine("ENTER string:");
string str = (Console.ReadLine();
switch (str)
{
case "keyword":
string[] kw = new string[2]{ "for","while"};
Console.WriteLine("\n\nkeyword");
Console.WriteLine(kw.Contains(str));
Console.ReadLine();
goto case "punctuation";
case "punctuation":
string[] punc = new string[2]{ ";","."};
Console.WriteLine("\n\npunctuation");
Console.WriteLine(punc.Contains(str));
Console.ReadLine();
goto default;
default:
Console.WriteLine("\n\ninvalid string");
break;
}}