I get an "object reference not set to an instance of an object" error when trying to use control. Not sure whats going on, any ideas?
Code:
Private Sub addbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addbutton.Click
Dim rc As DataRowCollection
Dim newrow As DataRow
Dim nrc(15) As Object
nrc(0) = ""
nrc(1) = ""
nrc(2) = ""
nrc(3) = ""
nrc(4) = ""
nrc(5) = ""
nrc(6) = ""
nrc(7) = ""
nrc(8) = ""
nrc(9) = ""
nrc(10) = ""
nrc(11) = ""
nrc(12) = ""
nrc(13) = ""
nrc(14) = ""
newrow = rc.Add(nrc) <----- Object reference not set...