title: vb.net datatable loop through rows by specific column name
body: <p>Hi i am trying to loop through row only in specific column. However i did not succeed, can any one help me.
  Here is my code, myXvalue = "CPI" is the column header Name.</p>
  
  <pre><code>Dim myXvalue = "CPI"
  
   For Each column As DataColumn In dt.Columns
  
  
                  If column.ColumnName = myXvalue Then
  
                      For k As Integer = 0 To dt.Rows(myXvalue).Count - 1
  
                          Console.WriteLine(myXvalue &amp; " === " &amp; dt.Rows(0)(k).ToString)
  
  
                      Next
  
                      Console.ReadKey(True)
  
  
                  End If
  </code></pre>