Classes Files

Wombat::NullableBool

Modelled after Nullable in C# 2.0

Inherits from IComparable

Public Functions

  Name
  NullableBool(bool value)
Constructor
bool GetValueOrDefault()
Get the value
bool GetValueOrDefault(bool defaultValue)
Get value, or default if value is not defined
override bool Equals(object other)
Test for equality
int CompareTo(object obj)
Compare another object
override int GetHashCode()
Return the hashcode
override string ToString()
Stringify the value
implicit operator NullableBool(bool value)
Conversion from bool
static operator bool(NullableBool value)
Conversion to bool

Public Properties

  Name
bool HasValue
Return TRUE if object has a value
bool Value
Return the value

Public Functions Documentation

function NullableBool

NullableBool(
    bool value
)

Constructor

function GetValueOrDefault

bool GetValueOrDefault()

Get the value

Get the value

function GetValueOrDefault

bool GetValueOrDefault(
    bool defaultValue
)

Get value, or default if value is not defined

function Equals

override bool Equals(
    object other
)

Test for equality

Parameters:

  • other Object to compare with

Return: TRUE if other object is equal to this one, FALSE otherwise

function CompareTo

int CompareTo(
    object obj
)

Compare another object

Parameters:

  • obj Object to compare with

Return: If both objects are the same, returns zero. If this object has a value but the other object does not, returns +1. If this object does not have a value, but the other object does have a value, returns -1. If both objects have a value, returns an indication of their relative values /returns>

function GetHashCode

override int GetHashCode()

Return the hashcode

function ToString

override string ToString()

Stringify the value

function operator NullableBool

static implicit operator NullableBool(
    bool value
)

Conversion from bool

function operator bool

static explicit static operator bool(
    NullableBool value
)

Conversion to bool

Public Property Documentation

property HasValue

bool HasValue;

Return TRUE if object has a value

property Value

bool Value;

Return the value


Updated on 2023-03-31 at 15:29:33 +0100