title: How to Invoke a function in a List in C#
body: <p>I'm fairly new to C# and trying to figure out how to invoke a function from a list. I thought that List would do the job I need it to. I can get my functions into the list, but I can't seem to actually invoke them. </p>
  
  <p>First I tried this:</p>
  
  <pre><code>List&lt;Action&gt; randEvent = new List&lt;Action&gt;();
  
   void Test()
      {
          randEvent.Add(Test2);
          Invoke(randEvent(0), 0f);
      }
  
      void Test2()
      {
          print("This is a test of the random event system");
      }
  </code></pre>
  
  <p>Then this </p>
  
  <pre><code>   List&lt;Action&gt; randEvent = new List&lt;Action&gt;();
  
     void Test()
      {
          randEvent.Add(Test2);
          randEvent(0);
      }
  
      void Test2()
      {
          print("This is a test of the random event system");
      }
  </code></pre>
  
  <p>But neither works. What am I doing wrong? Is this even possible? The reason I want to do it this way is basically that I have 100 functions that I want my program to chose through at random when I call another function. </p>
  
  <p>Any solution appreciated, though keep in mind I'm very new to C# and code in general still. Thanks in advance.</p>