'For on a dataset, get column value

I am updating some old software in VB, and fixed this, but I'd like to know how to make the second option work.

The problem is in the second For loop in the code below. I'm not sure how to get a column of a specific row.

I have not worked much with VB and not used it for 10 years or so, so bare the question.

    Dim i As Integer = 0
    Dim dsSettings As New DataSet
    dsSettings.Locale = System.Globalization.CultureInfo.InvariantCulture
    If System.IO.File.Exists("QuaData\Settings.xml") Then
        dsSettings.ReadXml("QuaData\Settings.xml")

        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("IdPrefix").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)("IdPrefix").ToString()
        Next
    End If


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source