title: Object reference is required for the non-static field when fetching data from Service
body: <p>This code is in the code behind:</p>
  
  <pre><code> protected override async void OnAppearing()
      {
          base.OnAppearing();
  
          listView.ItemsSource = await Service.DataAsync();
      }
  </code></pre>
  
  <p>The class that fetches data:</p>
  
  <pre><code>public class Service
  {
      public List&lt;TodoItem&gt; TodoList { get; private set; }
      static HttpClient client;
  
      Service()
      {
          client = new HttpClient();
          client.MaxResponseContentBufferSize = 256000;
      }
  
      public async Task&lt;List&lt;TodoItem&gt;&gt; DataAsync()
      {
  
          TodoList = new List&lt;TodoItem&gt;();
  
  
          var uri = new Uri(string.Format(Constants.RestUrl, string.Empty));
  
          try
          {
              var response = await client.GetAsync(uri);
              if (response.IsSuccessStatusCode)
              {
                  var content = await response.Content.ReadAsStringAsync();
                  TodoList = JsonConvert.DeserializeObject&lt;List&lt;TodoItem&gt;&gt;(content);
                  Debug.WriteLine(content);
              }
          }
          catch (Exception ex)
          {
              Debug.WriteLine(@"ERROR {0}", ex.Message);
          }
  
          return TodoList;
      }
  }
  </code></pre>
  
  <p>When the class and task is static Im able to make this call and populate the listview but not without static. I dont want it to be static. Not duplcate.</p>