A developer needs to reference the data in the first row of the "ID" column in the System.Data.DataTable, "DT". Which expression is used to reference this data?
A developer needs to reference the data in the first row of the "ID" column in the System.Data.DataTable, "DT". Which expression is used to reference this data?
To reference the data in the first row of the 'ID' column in a System.Data.DataTable, the expression DT.Rows(0).Item('ID') is used. In a DataTable, Rows is zero-indexed, so the first row is accessed with Rows(0). The column is accessed using the Item method with the column name as a parameter.
The given answer is correct