title: Task invokes immediately upon being added to a List<Task> if the function has parenthesis. How can I pass in args to a function as a Task?
body: <p>I'm working with Tasks in C#. I'm having an issue with function invocation when I add my functions to the List. What happens is, instead of waiting until the Task.WhenAll(...) to invoke all functions at once, it invokes them immediately when added...only whenever I need to add them as a NameOfFunction() (so with parenthesis, with or without params).</p>
  <p>This does not work and causes invocation immediately:</p>
  <pre class="lang-cs prettyprint-override"><code>List&lt;Task&gt; rtcTasks = new List&lt;Task&gt;();
  
  rtcTasks.Add(RunInitialProcess());
  rtcTasks.Add(RunSecondaryProcess());
  
  Task.WhenAll(rtcTasks).Wait();
  </code></pre>
  <p>This does work and invokes all when the process reaches Task.WhenAll(...);</p>
  <pre class="lang-cs prettyprint-override"><code>List&lt;Task&gt; rtcTasks = new List&lt;Task&gt;();
  
  rtcTasks.Add(Task.Run(RunInitialProcess));
  rtcTasks.Add(Task.Run(RunSecondaryProcess));
  
  Task.WhenAll(rtcTasks).Wait();
  </code></pre>
  <p>My issues is, I'd like to pass in functions that contain arguments that I can use for handling very easily without having to declare accessible objects in the current class I'm in.</p>
  <p>Both functions are:</p>
  <pre class="lang-cs prettyprint-override"><code>private async Task FunctionNameHere(){...}
  </code></pre>