Hi,
I have no idea why am getting this kind of error,
"Input was not in the correct format"
here is my line of codding...
int userid = int.Parse(i.SubItems[3].Text);
Converting int to a string
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Dec 4, 2014, 12:57 AM EST
What in fact does it contain?
Incidentally, you can guard against errors of this type by using int.TryParse rather than int.Parse:
int userid;
int.TryParse(i.SubItems[3].Text, out userid);
// userid will contain 0 if the Text property contains something non-integral
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 4, 2014, 12:01 AM EST
Enos128 reputationPosted Dec 4, 2014, 12:06 AM EST
Vikram AgrawalRank #4,713 · 329 reputationPosted Dec 4, 2014, 12:45 AM EST
can you describe what is i in your code?