title: Shorten long switch case
body: <p>So let me start by saying I am new to C#. I have a switch statement that currently has 10 different cases, however, I need to use it 3 different times (same 10 cases, different results per case), and each case there is only a slight change.</p>
  
  <p>I feel like I'm just repeating code, is there a way to shorten it?</p>
  
  <pre><code>//Set the growth time of the crop based on what cropType.
          switch (cropType) {
              case 1:
                  //Potatoes
                  growth = 60;
                  break;
              case 2:
                  //Strawberries
                  growth = 80;
                  break;
              case 3:
                  //Cabbages
                  growth = 90;
                  break;
              case 4:
                  //Carrots
                  growth = 40;
                  break;
              case 5:
                  //Melon
                  growth = 120;
                  break;
              case 6:
                  //Pumpkin
                  growth = 130;
                  break;
              case 7:
                  //Eggplant
                  growth = 50;
                  break;
              case 8:
                  //Mushroom
                  growth = 70;
                  break;
              case 9:
                  //Wheat
                  growth = 40;
                  break;
              case 10:
                  //Truffle
                  growth = 150;
                  break;
          }
  </code></pre>
  
  <p>That is my code for 1 section. In the 2nd section, I assign an image depending on the case, this has to be done separately as it relies on the growth and changes, whereas growth does not. I don't actually use it on the other swithces though. This is another one I have further down:</p>
  
  <pre><code>switch (cropType) {
              case 1:
                  //Potatoes
                  Debug.Log("Potatoes Harvested!");
                  Global.potato += 2;
                  break;
              case 2:
                  //Strawberries
                  Debug.Log("Strawberries Harvested!");
                  Global.strawberry += 4;
                  break;
              case 3:
                  //Cabbages
                  Debug.Log("Cabbages Harvested!");
                  Global.cabbage += 1;
                  break;
              case 4:
                  //Carrots
                  Debug.Log("Carrots Harvested!");
                  Global.carrot += 3;
                  break;
              case 5:
                  //Melon
                  Debug.Log("Melons Harvested!");
                  Global.melon += 1;
                  break;
              case 6:
                  //Pumpkin
                  Debug.Log("Pumpkins Harvested!");
                  Global.pumpkin += 1;
                  break;
              case 7:
                  //Eggplant
                  Debug.Log("Eggplant Harvested!");
                  Global.eggplant += 2;
                  break;
              case 8:
                  //Mushroom
                  Debug.Log("Mushrooms Harvested!");
                  Global.mushroom += 4;
                  break;
              case 9:
                  //Wheat
                  Debug.Log("Wheat Harvested!");
                  Global.wheat += 6;
                  break;
              case 10:
                  //Truffle
                  Debug.Log("Truffles Harvested!");
                  Global.truffle += 1;
                  break;
          }
  </code></pre>
  
  <p>Basically it is a script that needs to do different things based on what cropType is in it. </p>