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 9094867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:27:20+00:00 2026-06-16T23:27:20+00:00

I am someone migrating from a C++/Win32 development environment to C#/.NET. One thing that

  • 0

I am someone migrating from a C++/Win32 development environment to C#/.NET. One thing that I have noticed is that mostly erroneous states are handled in C++/Win32 by the use of error codes and their propagation.

To the contrary most erroneous states in C# /.NET seem to be handled by the use of exceptions and error codes are seldom advised to be used.

Why so?

  • 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-06-16T23:27:22+00:00Added an answer on June 16, 2026 at 11:27 pm

    The main issue with error codes is that one needs to check them. Always.

    And we are only human and can forget.

    This can mean we can get our programs into inconsistent state by simply forgetting to check an error code.

    If we forget to handle an exception, though, our program will exit.

    This is seen as preferable to it continuing to run in an inconsistent state.

    Much of the reason that error codes are still prevalent in C/C++ code is historical – these languages didn’t have exception handling, so needed error codes. And there are many libraries and code out there that conforms to this idiom, so programmers need to keep with it.

    There are other reasons to use exception apart from the fact that they cannot be ignored – they carry quite a lot of context, as Marc observed – stack traces, messages and more, beyond the type of the exception.

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

Sidebar

Related Questions

Can someone explain how the new states work in flex 4 im migrating from
I have written two methods that take and return a string. One converts from
migrating from one django version to the next, usually requires that you read the
I am currently migrating an application from a windows environment to a Redhat one.
I am migrating an application from ASP.NET Web Forms to ASP.NET MVC 3. One
I'm migrating to C++ from C and the very first thing I've noticed is
I am migrating from PHP4 to PHP5 I have this in my .htaccess: php_flag
What are the compatibility issues someone has to take into account when migrating from
After migrating from XCODE 4 to 4.2 i have quite a few problems with
Can someone point out the most common roadblocks when migrating a .net 2.0 app

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.