How do I read the data from a datareader into a list. I am using vb.net. The app is a windows forms app. This is what I have been trying but to no avail.Using breakpoints I can see that the variables contain data and that items are being added to the list, but each item added to the list is empty. How do I resolve this? Thanks.
VB.NET:
Dim RM_Draw As Double
Dim RM_SP As Integer
Dim Finishing_Position As Integer
Dim drawstats As New List(Of DrawStats)
While (dr.Read())
RM_Draw = dr.GetInt32(dr.GetOrdinal("RM_Draw"))
RM_SP = dr.GetDecimal(dr.GetOrdinal("RM_SP"))
Finishing_Position = dr.GetInt32(dr.GetOrdinal("Finishing_Position"))
drawstats.Add(New DrawStats(drawstats))
End While