title: Dynamic switch cases
body: <p>I'm trying to make a simple switch case console menu for a few different users: <code>admin</code>, <code>moderator</code>, and <code>user</code>. <code>admin</code> would have <code>create, delete, modify, show</code> functions, <code>moderator</code> - <code>create, modify, show</code> functions, and <code>user</code> - <code>create, show</code> functions to choose from.</p>
  
  <p>Admin switch case:</p>
  
  <pre><code>if(userType == "admin")
  {
      string i = Console.ReadLine();
      switch(i):
      case "create": Console.WriteLine("Created");
                     break;
      case "modify": Console.WriteLine("Modified");
                     break;
      case "delete":Console.WriteLine("Deleted");
                    break;
      case "show":Console.WriteLine("Showed");
                  break;
      default: Console.WriteLine("Default");
               break;
  }
  </code></pre>
  
  <p>Moderator switch case:</p>
  
  <pre><code>if(userType == "moderator")
  {
      string i = Console.ReadLine();
      switch(i):
      case "create": Console.WriteLine("Created");
                     break;
      case "modify": Console.WriteLine("Modified");
                     break;
      case "show": Console.WriteLine("Showed");
                   break;
      default: Console.WriteLine("Default");
               break;
  }
  </code></pre>
  
  <p>User switch case:</p>
  
  <pre><code>if(userType == "user")
  {
      string i = Console.ReadLine();
      switch(i):
      case "create": Console.WriteLine("Created");
                     break;
      case "show": Console.WriteLine("Showed");
                   break;
      default: Console.WriteLine("Default");
               break;
  }
  </code></pre>
  
  <p>Is there any way to mold these switch cases into one dynamic switch? If I'm thinking or explaining something wrong, please correct me.</p>