FoodCandy!

DBBool Struct Reference

Represents Null, False, and True. More...

List of all members.


Public Member Functions

 DBBool (int value)
 Private instance constructor. The value parameter must be –1, 0, or 1.
override bool Equals (object o)
 Determines whether two DBBool instances are equal.
override int GetHashCode ()
 Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
override string ToString ()
 Returns a string representation of the current Object.

Static Public Member Functions

static implicit operator DBBool (bool x)
 Implicit conversion from bool to DBBool. Maps true to DBBool.True and false to DBBool.False.
static operator bool (DBBool x)
 Explicit conversion from DBBool to bool.
static DBBool operator== (DBBool x, DBBool y)
 Equality operator.
static DBBool operator!= (DBBool x, DBBool y)
 Inequality operator.
static DBBool operator! (DBBool x)
 Logical negation operator.
static DBBool operator & (DBBool x, DBBool y)
 Logical AND operator.
static DBBool operator| (DBBool x, DBBool y)
 Logical OR operator.
static bool operator true (DBBool x)
 Definitely true operator.
static bool operator false (DBBool x)
 Definitely false operator.

Public Attributes

sbyte value
 Private field that stores –1, 0, 1 for False, Null, True.

Static Public Attributes

static readonly DBBool Null = new DBBool(0)
 A DBBool containing 'Null'.
static readonly DBBool False = new DBBool(-1)
 A DBBool containing 'False'.
static readonly DBBool True = new DBBool(1)
 A DBBool containing 'True'.

Properties

bool IsNull
 Properties to examine the value of a DBBool.
bool IsFalse
 Properties to examine the value of a DBBool.
bool IsTrue
 Properties to examine the value of a DBBool.

Detailed Description

Represents Null, False, and True.

Source: Microsoft c# example


Member Function Documentation

override bool Equals object  o  ) 
 

Determines whether two DBBool instances are equal.

Parameters:
o The object to check.
Returns:
True if the two DBBools are equal.

override int GetHashCode  ) 
 

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Returns:
A hash code for the current DBBool.

static DBBool operator & DBBool  x,
DBBool  y
[static]
 

Logical AND operator.

Parameters:
x a DBBool
y a DBBool
Returns:
Returns False if either operand is False, otherwise Null if either operand is Null, otherwise True.

static operator bool DBBool  x  )  [explicit, static]
 

Explicit conversion from DBBool to bool.

Exceptions:
InvalidOperationException The given DBBool is Null
Parameters:
x a DBBool
Returns:
true or false

static implicit operator DBBool bool  x  )  [static]
 

Implicit conversion from bool to DBBool. Maps true to DBBool.True and false to DBBool.False.

Parameters:
x a DBBool

static bool operator false DBBool  x  )  [static]
 

Definitely false operator.

Parameters:
x a DBBool
Returns:
Returns true if the operand is False, false otherwise.

static bool operator true DBBool  x  )  [static]
 

Definitely true operator.

Parameters:
x a DBBool
Returns:
Returns true if the operand is True, false otherwise.

static DBBool operator! DBBool  x  )  [static]
 

Logical negation operator.

Parameters:
x a DBBool
Returns:
Returns True if the operand is False, Null if the operand is Null, or False if the operand is True.

static DBBool operator!= DBBool  x,
DBBool  y
[static]
 

Inequality operator.

Parameters:
x a DBBool
y a DBBool
Returns:
Returns Null if either operand is Null, otherwise returns True or False.

static DBBool operator== DBBool  x,
DBBool  y
[static]
 

Equality operator.

Parameters:
x a DBBool
y a DBBool
Returns:
Returns Null if either operand is Null, otherwise returns True or False.

static DBBool operator| DBBool  x,
DBBool  y
[static]
 

Logical OR operator.

Parameters:
x a DBBool
y a DBBool
Returns:
Returns True if either operand is True, otherwise Null if either operand is Null, otherwise False.

override string ToString  ) 
 

Returns a string representation of the current Object.

Exceptions:
InvalidOperationException Object has not been initialized.
Returns:
A string containing DBBool.False, DBBool.Null, or DBBool.True

Member Data Documentation

readonly DBBool False = new DBBool(-1) [static]
 

A DBBool containing 'False'.

One of three possible DBBool values.

readonly DBBool Null = new DBBool(0) [static]
 

A DBBool containing 'Null'.

One of three possible DBBool values.

readonly DBBool True = new DBBool(1) [static]
 

A DBBool containing 'True'.

One of three possible DBBool values.


Property Documentation

bool IsFalse [get]
 

Properties to examine the value of a DBBool.

Return true if this DBBool has the given value, false otherwise.

bool IsNull [get]
 

Properties to examine the value of a DBBool.

Return true if this DBBool has the given value, false otherwise.

bool IsTrue [get]
 

Properties to examine the value of a DBBool.

Return true if this DBBool has the given value, false otherwise.


The documentation for this struct was generated from the following file:
  • DBBool.cs
© FoodCandy, 2006-2007, All Rights Reserved | FoodCandy | Sun Oct 7 10:48:52 2007 | Doxygen 1.4.6-NO