Wierd exception

03/24/2011 12:04 Syst3m_W1z4rd#1
#Removed the content, since it was a pretty long page.
If you really want to know it find an archive online or just ask.
03/24/2011 13:06 nTL3fTy#2
If you just debug the program and take a look at your values when the exception occurs, you can learn why it's crashing.

You get the exception because split[5] is an empty string, which cannot be parsed. split[5] is an empty string because of the way you create the string in the first place (bytestring += b + "~"). The resultant string is 1~2~3~4~5~.

You could fix this by either changing the way you create the string, or change the way the string is split.

The latter being:
Code:
string[] split = bytesplit.Split(new[] { '~' }, StringSplitOptions.RemoveEmptyEntries);
03/24/2011 13:12 Syst3m_W1z4rd#3
I get it, thank you :)