title: How to access previous functions added to a delegate
body: <p>I'm new to delegates and as far as I understood you can add two functions or even more to a delegate (using <code>+=</code>). But when you activate a delegate it will always call the last function added. What if I wanted to call a function that I added before? let's say I have:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public static int add(int o1, int o2)
  {
     return o1 + o2;
  }
  
  public static int multiply(int o1, int o2)
  {
      return o1 * o2;
  }
  
  public static int minus(int o1, int o2)
  {
      return o1 - o2;
  }
  </code></pre>
  
  <p>So I use a delegate (actually a <code>Func</code>) to add all those functions.</p>
  
  <pre class="lang-cs prettyprint-override"><code>Func&lt;int, int, int&gt; f;
  f = add;
  f += multiply;
  f += minus;
  </code></pre>
  
  <p>Now lets say I want to call <code>multiply</code> or <code>add</code>, I cant do this, if I use:</p>
  
  <pre class="lang-cs prettyprint-override"><code>Console.WriteLine(f(1,2));
  </code></pre>
  
  <p>It will only call <code>minus</code>.</p>
  
  <p><strong>edit</strong></p>
  
  <p>By the way, I'm aware of the possibility to remove function using <code>-=</code>, but if there is a large number of functions, its not convenient. the kind of solutions I'm looking for is indexes (like in arrays) however </p>
  
  <pre class="lang-cs prettyprint-override"><code>f[2](5,3) 
  </code></pre>
  
  <p>Doesn't seem to work.</p>