TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vikas Ahlawat
NA
564
817.7k
what is my mistake?
Oct 24 2009 7:52 AM
for (int i = 2; i <= SCdataGridView1.Rows.Count;i++)
{
int malecount = 0;
if (SCdataGridView1.Rows[i].Cells[8].Value.ToString() == "Male") //here the error occure because I put here i
{
malecount = malecount + 1;
SClabel6.Text = malecount.ToString();
}
}
error is
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Reply
Answers (
3
)
How to add condition while deploying the C#.net Windows application
why still console applications r needed