[CLOSED] Why ThreeStateBool instead Nullable<bool>?

  1. #1

    [CLOSED] Why ThreeStateBool instead Nullable<bool>?

    In TreeNodeBase there are two properties:
    public virtual ThreeStateBool Checked
    and
    public virtual ThreeStateBool Expandable

    with very strange Enum ThreeStateBool,

    may be better to use is Nullable<bool> (bool?)?

    there are same three states - true/false/null
    Last edited by Daniil; Sep 01, 2010 at 2:41 PM. Reason: [CLOSED]
  2. #2
    Hello!

    Maybe you are right... But this way has been chosen. Perhaps because of the "undefined" value is closer to JavaScript's undefined.
    At least there is one advantage. It would be easier to make refactoring if one more bool state appears:)

Similar Threads

  1. Nullable Parameters
    By Zdenek in forum 1.x Help
    Replies: 1
    Last Post: Mar 16, 2012, 7:54 PM
  2. [CLOSED] Nullable number field
    By Stefanaccio in forum 1.x Premium Help
    Replies: 1
    Last Post: Jun 02, 2010, 6:06 PM
  3. [CLOSED] Nullable (three state) checkbox
    By pil0t in forum 1.x Premium Help
    Replies: 1
    Last Post: May 25, 2010, 11:41 AM
  4. [1.0] Problem with Bool-Typecasting in XmlReader
    By macap in forum 1.x Premium Help
    Replies: 5
    Last Post: Mar 09, 2010, 1:55 PM
  5. Replies: 2
    Last Post: Apr 02, 2009, 7:43 PM

Posting Permissions