I do not believe that there is a ResultSet type in .Net.
You talk about accessing the values of rows and columns so the obvious candidate would be a
DataTable
for your class field.
This page from MSDN[
^] shows how to execute the SP using a
DataReader
.
You can convert that to a DataTable using something like this:
public static DataTable ReaderToTable(SqlDataReader reader)
{
DataTable newTable = new DataTable();
DataColumn col;
DataRow row;
int i;
for (i = 0; i < reader.FieldCount; i++)
{
col = new DataColumn();
col.ColumnName = reader.GetName(i);
col.DataType = reader.GetFieldType(i);
newTable.Columns.Add(col);
}
while (reader.Read())
{
row = newTable.NewRow();
for (i = 0; i < reader.FieldCount; i++)
{
row[i] = reader[i];
}
newTable.Rows.Add(row);
}
return newTable;
}