title: How do I do a switch statement using cases as strings in a combo box?
body: <p>This is what is inside my Combo Box.</p>
  
  <pre><code>Runescape
  Maplestory
  League of Legends
  </code></pre>
  
  <p>Here is the code I tried using switch statement.</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      switch (comboBox1.SelectedIndex)
      {
          case "Runescape":
              MessageBox.Show("You are playing RS");
              break;
  
          case "Maplestory":
              MessageBox.Show("You are playing MS");
              break;
  
          default:
              MessageBox.Show("You're playing League");
              break;
      }
  }
  </code></pre>
  
  <p>It's giving me an error that it won't let me implicitly convert string to int.</p>
  
  <p>I want to use the cases as a string instead of a number. How do I do that?</p>
  
  <hr>
  
  <p>Also, just out of curiosity if it works where we can get part of a string as a case instead. Pretend the combobox said "Runescape 3" instead of "Runescape". I'm not sure if C# can recognize part of the string.</p>
  
  <pre><code>case "Runescape":
          MessageBox.Show("You are playing RS");
          break;
  </code></pre>