title: How to get values from API?
body: <p>I apologize for this post because it may seem banal to some people. But I would like to understand the operation of the <strong>GET API</strong>, unfortunately, somehow I have not found an accessible tutorial. As the best way to learn from examples, could anyone show me how to get the values from the name tag in the easiest way? can be up to textBox.</p>
  
  <p>In xml:</p>
  
  <p><a href="https://bdl.stat.gov.pl/api/v1/subjects?lang=pl&amp;format=xml" rel="nofollow noreferrer">https://bdl.stat.gov.pl/api/v1/subjects?lang=pl&amp;format=xml</a></p>
  
  <p>In json:</p>
  
  <p><a href="https://bdl.stat.gov.pl/api/v1/subjects?lang=pl&amp;format=json" rel="nofollow noreferrer">https://bdl.stat.gov.pl/api/v1/subjects?lang=pl&amp;format=json</a></p>
  
  <p>Code</p>
  
  <pre><code>public class Result
  {
      public string id { get; set; }
      public string name { get; set; }
      public bool hasVariables { get; set; }
      public List&lt;string&gt; children { get; set; }
      public string levels { get; set; }
  }
  
  private void button1_Click(object sender, EventArgs e)
  {
      using (WebClient wc = new WebClient())
      {
          wc.Encoding = System.Text.Encoding.UTF8;
           var json = wc.DownloadString("https://bdl.stat.gov.pl/api/v1/subjects?lang=pl&amp;format=json");
  
          Result result = JsonConvert.DeserializeObject&lt;Result&gt;(json);
  
          richTextBox1.Text = result.name;
      }
  }
  </code></pre>
  
  <p>Thank you in advance for your help.</p>