title: difference between task and function that return task
body: <p>hi i know we can run task with c# like this </p>
  
  <pre><code>Task t1 = new Task(new Action(A))
  </code></pre>
  
  <p>but A is static function<br>
  can we have non static function and when we have function that return task
  can we have run like </p>
  
  <pre><code>new Task(new Action(A));
  </code></pre>
  
  <p>if we cant what is def between </p>
  
  <pre><code>  static void A()
   {
          Console.Write("task");
   }
      Task t1 = new Task(new Action(A));  
  </code></pre>
  
  <p>and</p>
  
  <pre><code>  public async Task&lt;BitmapImage&gt; Set_Image(string location_in_server, string location_to_save, string name_file)
          {
              Ntaban.Api.API_HttpClient apic = new Ntaban.Api.API_HttpClient();
          string location = location_to_save + name_file;
          string location_directory = location_to_save;
          if (Directory.Exists(location_directory) == false)
          {
              Directory.CreateDirectory(location_directory);
          }
          if (File.Exists(location) == false)
          {
              await apic.download_file_async(location_in_server + name_file, location, null);
          }
          BitmapImage s1 = new BitmapImage();
          s1.BeginInit();
          s1.UriSource = new System.Uri(location_to_save + name_file);
          s1.EndInit();
          return s1;
      }
    imgProfile.Source = savefile.Set_Image(Ntaban.Api.API_server.Host + "/content/profile/", St_Major.Directories.Directory_Main, lst.First().picAdr).Result;
  </code></pre>