title: How do I loop through rows with a data reader in C#?
body: <p>I know I can use <code>while(dr.Read()){...}</code> but that loops every field on my table, I want to retrieve all the values from the first row, and then second... and so on.</p>
  
  <p>Let's say I have a table like this:</p>
  
  <pre><code>ID--------------Value1--------------Value2------------------Value3
  1               hello               hello2                  hello3
  2               hi1                  hi2                      hi3
  </code></pre>
  
  <p>first I want to get, <code>hello</code>, <code>hello2</code> and <code>hello3</code> and then go to the second row and get all the values.</p>
  
  <p>Is there a way to achieve this? I hope somebody understand what I mean.</p>
  
  <p><strong>I am so sorry, this is solved now. I just wasn't coding right...</strong></p>
  
  <p><strong>And yeah the SqlDataReader.Read() method does what it is supposed to do, again the mistake was mine.</strong></p>