cdemott33
asked on
Help with system.outofmemory error - Do While Loop
I'm sure this is something simple but I just don't see it. I'm getting a system.outofmemory error when I execute this script. Can someone have a look at it and tell me what I'm doing incorrectly.
Dim dt As New DataTable
dt.Columns.Add("Times", GetType(String))
Dim startTime As DateTime = "12:00 AM"
Dim row As DataRow
row = dt.NewRow()
row("Times") = startTime
dt.Rows.Add(row)
Do While startTime <> "11:30 PM"
row = dt.NewRow()
startTime = startTime.AddMinutes(30)
row("Times") = startTime
dt.Rows.Add(row)
Loop
GridView1.DataSource = dt
GridView1.DataBind()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER