Im playing around with TryParse()
But lets say the parsing fails, then returns false, and … nothing.. Is there a way to get info back about what failed the parsing?
I saw something like that at codeproject, but i didnt really understand it.
Thanks 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there’s no way of getting that information from the normal .NET routines. You could check for a few things manually:
You haven’t said what you’re trying to parse (integer, double etc) or what options you want (allow hex, thousands separators etc) which makes it harder to give a good list of things to check.