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

The Archive Base Latest Questions

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

Why was it decided that when parsing a boolean, 0/1 are not acceptable? When

  • 0

Why was it decided that when parsing a boolean, 0/1 are not acceptable?

When parsing any integer type value, it accepts numerical strings to be parsed. (And if .NET can parse the string “One hundred million two hundred and sixty five thousand eight hundred and sixty five” I would be surprised).

What makes booleans special? They are essentially 0 as false, and non-zero as true in my experience…

Is there a bcl method to parse a string like this, and if not, why?

Note: I forgot to specify in a string “0” and “1”. Curious though that if already an int it works as I anticipated. Maybe this caused the confusion.

  • 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-13T01:50:44+00:00Added an answer on May 13, 2026 at 1:50 am

    0 and (not-zero) are not equal to “false” and “true”, they’re just the representation chosen by C. Other languages use 0 for true and -1 for false, or other schemes entirely. A boolean is not a 0 or a 1, it’s a true or a false.

    Should it also handle “yes” and “no”, “off” and “on”, and all of the myriad other things that are analogous to booleans? Where would you draw the line?

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

Sidebar

Related Questions

I have pretty big background of .net, and I've decided that i want to
I'm an old (but not too old) Java programmer, that decided to learn C++.
Why is it that they decided to make String immutable in Java and .NET
I am trying to implement a library with extended parsing capabilities. I decided that
I have this class: public class TimeIntCo<T> extends TimeValueCo<Integer> { } I decided that
Ive decided that I really dont like microsoft and their ways. Please could you
I have decided that all my WPF pages need to register a routed event.
I've recently decided that I just have to finally learn C/C++, and there is
I have decided that I really need to get some flowcharts for reverse engineering
I decided to install APC to speed up the site that I work 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.