Answer to Question #31846 in C# for sarasaleh5
2013-06-10T10:18:19-04:00
Hii,
I am new to C# and I need help please..
When I run my website application, I get an IndexOutOfRangeException error in line 4. The following is part of my code:
1 DataRow dr;
2 dr = dtView.NewRow();
3 dr[0] = "Track Name";
4 dr[1] = dtPlaylist.Rows[0][1].ToString();
5 dtView.Rows.Add(dr);
6
7 dr = dtView.NewRow();
8 dr[0] = "Title";
9 dr[1] = dtPlaylist.Rows[0][2].ToString();
10 dtView.Rows.Add(dr);
11
12 dr = dtView.NewRow();
13 dr[0] = "Artist Name";
14 dr[1] = dtPlaylist.Rows[0][3].ToString();
15 dtView.Rows.Add(dr);
Thank you in advance.
0
Answer in progress...
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS !
Learn more about our help with Assignments:
C#
Comments
Leave a comment