title: Asyncallback function how to wait it for completed and get result when call
body: <p>I have 2 function </p>
  
  <pre><code>public void sendGETRequest()
          {
              System.Uri targetUri = new System.Uri(urlAdress);
              HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(targetUri);
              request.Method = "GET";
              request.Headers["X_USERNAME"] = username;
              request.Headers["X_PASSWORD"] = password;
              request.BeginGetResponse(new AsyncCallback(ReadWebRequestCallback), request);
          }
  
          private void ReadWebRequestCallback(IAsyncResult callbackResult)
          {           
              HttpWebRequest myRequest = (HttpWebRequest)callbackResult.AsyncState;
              HttpWebResponse myResponse = (HttpWebResponse)myRequest.EndGetResponse(callbackResult);
  
              using (StreamReader httpwebStreamReader = new StreamReader(myResponse.GetResponseStream()))
              {
                  result = httpwebStreamReader.ReadToEnd();                
              }
              myResponse.Close();
              if (Completed != null)
                  Completed();
          }
      }
  </code></pre>
  
  <p>When I call </p>
  
  <pre><code> GET user;   
      public String GETUserList()
      {
        user  = new GET();
        user.urlAdress = url + "user";
         user.username = username;
         user.password = password;
  
         user.sendGETRequest();
  
         user.Completed += OutUser;
  
         if (Completed != null)
             Completed();
  
  
         return user.result;
      }
  
  
  void OutUser()
              {
                 Debug.WriteLine(user.result);
              }
  </code></pre>
  
  <p><strong>if I CALL 1 ACTION  like this To get list of user</strong></p>
  
  <pre><code>String json = GETUserList();
              Debug.WriteLine("Hllllllllllll" + json + "HHHHHHHHHHHHHH" + p.resultWords);
  </code></pre>
  
  <p><strong>It return</strong> </p>
  
  <pre><code>HllllllllllllHHHHHHHHHHHHHH
  [{"id":"3","username":"a","password":"a"},{"id":"4","username":"bbbb\n","password":"aaa"},{,{"id":"13","username":"abcdef","password":"abcdef"},{"id{"id":"10","word":"AAAAddddA","definition":"aaa","cardset_id":"2"},{"id":"11","word":"AAAAddddA","definition":"aaa","cardset_id":"2"},{"id":"12","word":"asdas","definition":"asdasd","cardset_id":"1"},{"id":"13","word":"asdas","definition":"asdasd","cardset_id":"1"},{"id":"14","word":"AAAAddddA","definition":"aaa","cardset_id":"2"},{"id":"15","word":"AAAAddddA","definition":"aaa","cardset_id":"2"},{"id":"16","word":"asdas","definition":"asdasd","
  </code></pre>
  
  <p>I think function  <strong>ReadWebRequestCallback(IAsyncResult callbackResult)</strong> is run in background and when <strong>I Call to get list of User</strong>  it execute after that (I've debugged.
  How to make it run before action completed?
  Thank for advance!</p>