title: Adding a column value by using DataReader
body: <p>Using C# &amp; MySQL</p>
  
  <p>When I select the combobox value, the corresponding value should display in textbox</p>
  
  <p>C# Code.</p>
  
  <pre><code>cmd2 = new OdbcCommand("Select name from users where username='" + cmbuser.Text  + "'", con);
  dr= cmd2.ExecuteReader();
  while (dr.Read())
  {
      txtusername.Text = dr("user");
  }
  </code></pre>
  
  <p>The Above code is working in VB.Net, but in C# showing error as Error "dr' is a 'field' but is used like a 'method' "</p>
  
  <p>It is showing error in this line <code>txtusername.Text = dr("user");</code></p>
  
  <p>How to solve this error, what problem in my code.</p>
  
  <p>Need C# Code Help</p>