c# FormatException was unhandled

Posted by poco on Stack Overflow See other posts from Stack Overflow or by poco
Published on 2011-01-29T03:05:27Z Indexed on 2011/01/29 7:26 UTC
Read the original article Hit count: 93

Filed under:
|

I'm parsing chat from a game and i get this string "?68 00 00 37 00 45 00 00"

recipe = recipe.Replace("?", "");
string[] rElements = new string[8];
rElements = recipe.Split(' ');
int num = int.Parse(rElements[0]);

I get a Format exception on that last line that i don't understand. It says that input string is not in the right format. I have checked the debugger and the first element says it is "68". Anyone have any clue what is happening?

© Stack Overflow or respective owner

Related posts about c#

Related posts about formatexception