Nov 25, 2003 #1 Pyramus Programmer Joined Dec 19, 2001 Messages 237 Location GB Isn't it possible in .NET to cast strings to ints and longs? I'm trying and getting compile errors.
Nov 25, 2003 #2 Craftor Programmer Joined Feb 1, 2001 Messages 420 Location NZ Have you tried things along the line of: Code: int.Parse(yourString); Upvote 0 Downvote
Nov 25, 2003 #3 SHelton Programmer Joined Jun 10, 2003 Messages 541 Location GB or: Code: int i = Convert.ToInt32(yourString); Don't forget your try...catch block to prevent format exceptions. Upvote 0 Downvote
or: Code: int i = Convert.ToInt32(yourString); Don't forget your try...catch block to prevent format exceptions.