title: Retrieving data from Dictionary C#
body: <p>So i am currently creating a program that maps a String key and a ArrayList of objects (currently integers)</p>
  
  <p>Now i have created a class called <code>Operator</code> that has a method which returns a Dictionary.</p>
  
  <p>To test the output of my Dictionary i decided to make pop (<code>Messagebox</code>) that displays the integer value.</p>
  
  <p>However this proved to be a deal breaker for me. After abit of research i managed to assemble the following code:</p>
  
  <pre><code>          Operator op = new Operator();
          ArrayList a;
          op.startCollecting().TryGetValue("Henvendelser", out a);
          int value = (int) a[0];
          MessageBox.Show("" + value);
  </code></pre>
  
  <p><em>Note the startCollecting method returns the Dictionary</em></p>
  
  <p>When trying to get the data i first have to create a new empty ArrayList, clone my existing ArrayList into that ArrayList, create an integer value, pull the item from the ArrayList at index 0 and then show the messagebox.</p>
  
  <p>I am originally a java programmer, and in Java i would have been able to do this:</p>
  
  <pre><code>int value = op.startCollecting().get("Henvendelser").get(0);
  </code></pre>
  
  <p>Am i doing it wrong in C#? is there an easier way of Retrieving data?</p>