예제 #1
0
 private string GetItemType(VendingItem item)
 {
     if (item.Type == ItemType.Candy)
     {
         return("Munch Munch, Yum!");
     }
     else if (item.Type == ItemType.Chip)
     {
         return("Crunch Crunch, Yum!");
     }
     else if (item.Type == ItemType.Drink)
     {
         return("Glug Glug, Yum!");
     }
     else
     {
         return("Chew Chew, Yum!");
     }
 }