title: For on a dataset, get column value
body: <p>I am updating some old software in VB, and fixed this, but I'd like to know how to make the second option work.</p>
  <p>The problem is in the second <code>For</code> loop in the code below. I'm not sure how to get a column of a specific row.</p>
  <p>I have not worked much with VB and not used it for 10 years or so, so bare the question.</p>
  <pre><code>    Dim i As Integer = 0
      Dim dsSettings As New DataSet
      dsSettings.Locale = System.Globalization.CultureInfo.InvariantCulture
      If System.IO.File.Exists(&quot;QuaData\Settings.xml&quot;) Then
          dsSettings.ReadXml(&quot;QuaData\Settings.xml&quot;)
  
          ReDim Preserve IdPrefixes(dsSettings.Tables(0).Rows.Count - 1)
  
          For Each Row As DataRow In dsSettings.Tables(0).Rows
              For Each Coll As DataColumn In dsSettings.Tables(0).Columns
                  IdPrefixes(i) = Row(&quot;IdPrefix&quot;).ToString()
              Next
              i = i + 1
          Next
  
          ' Here I cannot see how I can get a column of a row - 
          ' like Rows(1)
          ' I cannot select Rows(index)(column name)
          For i = 0 To dsSettings.Tables(0).Rows.Count - 1
              IdPrefixes(i) = dsSettings.Tables(0).Rows(i)(&quot;IdPrefix&quot;).ToString()
          Next
      End If
  </code></pre>