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

  • Home
  • SEARCH
  • 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

So, I understand that the following doesn't work, but why doesn't it work? interface
It seems that it doesn't understand something like /d D:\solution.sln, which is a problem.
I understand what System.WeakReference does, but what I can't seem to grasp is a
Does anyone have any experience in using compression on their cached data? I understand
Which algorithm does the JavaScript Array#sort() function use? I understand that it can take
I understand that VUGen's web_set_timeout function allows me to set a timeout value higher
I don't understand why this doesn't print out this is a test 42 like
Everything is in the title, I doesn't understand what the statement below does: #import
I'm trying to understand why this does not work. (Basic example with no validation
im just starting to learn flex and im trying to understand how Flex does

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.