title: cannot convert from System.Collections.Generic.List<sales.ScanInfo> to System.Collections.Generic.IEnumerable<System.Threading.Tasks.Task>
body: <p>I have the following code inside my c# console application, where i am calling a method called <code>getInfo</code> in parallel using <code>WhenAll()</code> method, as follow:-</p>
  
  <pre><code>class Program
      {
          static int concurrentrequests = int.Parse(ConfigurationManager.AppSettings["ConcurrentRequests"]);
          static SemaphoreSlim throttler = new SemaphoreSlim(initialCount: concurrentrequests);
  
          private static ScanInfo getInfo(string website)
          {
              throttler.Wait();
              ScanInfo si = new ScanInfo();
              int counter = 1;
              try
              {
                //code goes here..
  
              }
              catch (Exception e)
              {
                //code goes here
              }
  
              finally
              {
  
               throttler.Release();
              }
  
              }
              return si;
          }
  
          static void Main(string[] args)
          {
              Marketing ipfd = new Marketing();
              try
              {
                  using (WebClient wc = new WebClient()) // call the PM API to get the account id 
                  {
                     //code goes here
                  }
              }
              catch (Exception e)
              {
  
  
              }
              var tasks = ipfd.companies.Select(c =&gt; getInfo(c.properties.website.value)).ToList();
              var results = Task.WhenAll(tasks);
  
             //code goes here..   
          }       
      }
  </code></pre>
  
  <p>but i am getting this exception:-</p>
  
  <pre><code>Argument 1: cannot convert from
  System.Collections.Generic.List&lt;Sales.ScanInfo&gt; to
  System.Collections.Generic.IEnumerable&lt;System.Threading.Tasks.Task&gt;
  </code></pre>
  
  <p>so can anyone advice why i am getting this error?</p>