About 29,400,000 results
Open links in new tab
  1. What's the difference between "bool" and "bool?"?

    Oct 5, 2016 · bool is a value type, this means that it cannot be null, so the Nullable type basically allows you to wrap value types, and being able to assign null to them. bool? can contain three …

  2. c# - Convert nullable bool? to bool - Stack Overflow

    May 20, 2011 · How do you convert a nullable bool? to bool in C#? I have tried x.Value or x.HasValue ...

  3. gcc - Is bool a native C type? - Stack Overflow

    Oct 22, 2009 · 437 bool exists in the current C - C99, but not in C89/90. In C99 the native type is actually called _Bool, while bool is a standard library macro defined in stdbool.h (which …

  4. c++ - Alternative to vector<bool> - Stack Overflow

    As (hopefully) we all know, vector&lt;bool&gt; is totally broken and can't be treated as a C array. What is the best way to get this functionality? So far, the ideas I have thought of are: Use a ve...

  5. Difference between _Bool and bool types in C? - Stack Overflow

    Jan 4, 2012 · These data types were added in C99. Since bool wasn't reserved prior to C99, they use the _Bool keyword (which was reserved). bool is an alias for _Bool if you include …

  6. Using Boolean values in C - Stack Overflow

    bool and _Bool, and true and false are language keywords for boolean types. bool / _Bool is a type that can hold either the value true or false. Logical operators !, ||, and && can be used.

  7. Convert a string to a Boolean in C# - Stack Overflow

    Apr 1, 2018 · Additionally, there is bool.TryParse(string, out bool). It is equivalent to bool.Parse, with the difference that it returns true if it was able to convert the value and false otherwise.

  8. What is the difference between bool and Boolean types in C#

    Sep 25, 2008 · 2 bool is a primitive type, meaning that the value (true/false in this case) is stored directly in the variable. Boolean is an object. A variable of type Boolean stores a reference to a …

  9. What is the printf format specifier for bool? - Stack Overflow

    1138 There is no format specifier for bool types. However, since any integral type shorter than int is promoted to int when passed down to printf() 's variadic arguments, you can use %d:

  10. Converting from a string to boolean in Python - Stack Overflow

    How do I convert a string into a boolean in Python? This attempt returns True: >>> bool ("False") True