title: How to use Switch with dictionary values?
body: <p>In my code, I'd like to work with textual names of the items that are coded as one symbol in packets.</p>
  
  <p>In a usual situation, <code>1012</code> would mean <code>cat, dog, cat, frog</code> to me, but there are many more pairs like this, so it's hard to remember all of them. Sometimes they need to be changed, so I thought I should use a <code>Dictionary&lt;string, int&gt;</code> for that purpose. But then…</p>
  
  <pre><code>switch (symbol)
  {
      case "0": { /* ... */ }
      case "1": { /* ... */ }
      case "2": { /* ... */ }
      case "n": { /* ... */ }
  }
  </code></pre>
  
  <p>…becomes…</p>
  
  <pre><code>switch (symbol)
  {
      case kvpDic["cat"]: { /* ... */ }
      case kvpDic["dog"]: { /* ... */ }
      case kvpDic["frog"]: { /* ... */ }
      case kvpDic["something else"]: { /* ... */ }
  }
  </code></pre>
  
  <p>and the studio says I need to use constants for my switch.</p>
  
  <p>How do I make it work?</p>
  
  <p><strong>Upd</strong>: number of such <em>animals</em> and their value pairs are only known at runtime, so the code must not use constants (I guess).</p>