title: Proper data structure for private field - Inventory
body: <p>I am working on an assignment that involves managing an inventory of products. Specifically, we're given an interface IProduct and IInventory to implement. Most of it is straightforward, but I've run into a design roadblock, and I'm wondering about best practices.</p>
  
  <p>I have two choices for a backing field of my Inventory class: List or Dictionary (a custom class might be overkill). The assignment asks us to:</p>
  
  <ul>
  <li>Write a method allowing users to add Items to your Inventory.</li>
  <li>Disallow adding duplicate items (items with the same name).</li>
  <li>Implement Indexers (so that myInv[myItemName] should return the Item corresponding to myItemName)</li>
  <li>Write a method returning the list of items in alphabetical order by name.</li>
  </ul>
  
  <p>Given these requirements, I was about to jump in and make the private field a dictionary, but then I saw the requirement:</p>
  
  <ul>
  <li>Write a method returning the list of items in the order they are added to the inventory.</li>
  </ul>
  
  <p>I am wondering what the best course of action in this scenario would be. I'm juggling between two ideas:</p>
  
  <ol>
  <li>Create two private backing fields, a list and a dictionary, but that seems unwieldy and inelegant.</li>
  <li>Use a list, and jump through a few hoops for the first four requirements (like writing a loop for the indexers, and making a sorted copy later when asked for alphabetical order).</li>
  </ol>
  
  <p>Which of the above actions should I take, or should I do something completely different? </p>