Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 658263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:54:50+00:00 2026-05-13T22:54:50+00:00

I understand it doesn’t throw an Exception and because of that it might be

  • 0

I understand it doesn’t throw an Exception and because of that it might be sightly faster, but also, you’re most likely using it to convert input to data you can use, so I don’t think it’s used so often to make that much of difference in terms of performance.

Anyway, the examples I saw are all along the lines of an if/else block with TryParse, the else returning an error message. And to me, that’s basically the same thing as using a try/catch block with the catch returning an error message.

So, am I missing something? Is there a situation where this is actually useful?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:54:50+00:00Added an answer on May 13, 2026 at 10:54 pm

    It’s pretty much as simple as this: Use Parse if you want an exception when you encounter invalid data; use TryParse if you don’t. Your question seems, therefore, to be:

    Why would you not want an exception if data is invalid?

    Exceptions should only be used for exceptional cases, and the data being invalid might not be an exceptional case. Maybe you’re writing a data cleansing program that’s expecting to get invalid data and will try to infer what a reasonable value is when the data is invalid. Maybe the data isn’t all that important and you can just skip the record that contains it.

    It depends on context, and having the choice of Parse and TryParse methods lets you choose the appropriate parsing mechanism for yours.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this simple node.js code example but I don't understand why FireBug doesn't
I understand that the Express edition doesn't template unit test projects... but being a
I understand that Javascript doesn't have multiple threads, but I'd like to know if
Yes, I understand that JavaScript doesn't have classes per se, so I'll just throw
It seems that NHibernate Linq doesn't understand grouped .Where method conditions. I got the
I everyone, I've some issue to handling exception in ruby. I doesn't understand why
Maybe it's useful if calling a method that MyClass doesn't understand on a something
Google doesn't understand <> so that failed thus asking here. What does '<>' (less
I'm working with sqlite and qt. I understand that sqlite doesn't have native user
Google doesn't understand that between is the name of the function I'm looking for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.