title: C# How can JObject.Parse() wait until it gets json string totally
body: <p>I just create simple JsonDataManager to get writing in a JSON format and parsing it to use it later however <code>JObject.Parse</code> doesn't wait until webclient gets JSON data and directly use "its going to be filled by JSON" string.  How can I push it to wait until it gets JSON string totally? </p>
  
  <pre><code>public class JsonDataManager{
  
           String myData = "its going to be filled by json";
  
  
          public JsonDataManager(string Category)
          {
              String url = "&lt;a href="http://www.kaanbarisbayrak.com/?json=get_category_posts&amp;cat="+Category;&lt;br"&gt;http://www.kaanbarisbayrak.com/?json=get_category_posts&amp;cat="+Catego...&lt;/a&gt; /&gt;
              WebClient wc = new WebClient();
              wc.Encoding = System.Text.Encoding.UTF8;
              wc.Headers["Accept"] = "application/json";
              wc.DownloadStringAsync(new Uri(url), UriKind.Relative);
              wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
  
          }
  
  
          public String getWriting()
          {
              JObject obj = JObject.Parse(myData);
              JArray array = (JArray)obj["posts"];
              string writing = (string)array[0]["content"]; 
              return writing;
          }
  
  
  
          private void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
          {
              myData = e.Result;
          }
  
  
      }
  </code></pre>