title: How to get return value from call back method in c#
body: <p>I passed "GetFilesRevisions_Results" method for GetAsync which will handle the result for it.But I want to return a integer from "GetFilesRevisions_Results" method.How I can achieve this ?
  Thanks in advance!</p>
  
  <pre><code>private int GetVersionNumber(string i_sFileName)
  {
      #region Get latest version no.
      int nVerNo = 0;
     // RequestResult result;
      try
      {
  
      OAuthUtility.GetAsync
         (
         "https://api.dropboxapi.com/1/revisions/auto/",
             new HttpParameterCollection
                          {
                             { "path", i_sFileName },
                             { "access_token", accessToken },
                             { "rev_limit", 1 }
                          },
            callback:  GetFilesRevisions_Results ??? How I can access return variable 
         );
      }
      catch
      { 
  
      }
      return nVerNo;
      #endregion
  }
  
  private int GetFilesRevisions_Results(RequestResult result)
  {
      int nVerNo = 0;
  
      if (result.StatusCode == 200)
      {
          dynamic dynJson = JsonConvert.DeserializeObject(Convert.ToString(result));
          foreach (var item in dynJson)
          {
              nVerNo = Convert.ToInt32(item.rev);
          }
  
      }
      else
      {
          throw new Exception("Failed to get revisions of files");
      }
  
      return  nVerNo;
  }
  #endregion Get version Number
  </code></pre>