title: C# how does this code work?
body: <pre><code>Public class form1
  {
      List&lt;Data&gt; dataInfo = new List&lt;Data&gt;(); 
  
      private void UpdateBinding()
      {
          supplierBox.DataSource = dataInfo;
          supplierBox.DisplayMember = "Supplier";         
      }
  }
  </code></pre>
  
  <p>I have another class called <code>Data</code>:</p>
  
  <pre><code>public  class Data
  {
      public string Supplier { get; set; }
  }
  </code></pre>
  
  <p>This is able to update my textBox named supplier on Visual Studio with data from my SQL Server that I have grabbed. How would I access the data from my SQL Server if I just wanted to put it in a variable like var?</p>