Skip Headers
Oracle® Data Provider for .NET Developer's Guide
12c Release 1 (12.1.0.1.0)

Part Number E41125-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

OracleBoolean Structure

The OracleBoolean structure represents a logical value that is either TRUE or FALSE.

Class Inheritance

System.Object

  System.ValueType

    Oracle.DataAccess.Types.OracleBoolean

Declaration

// C#
public struct OracleBoolean : IComparable, INullable, IXmlSerializable

Requirements

Provider ODP.NET, Unmanaged Driver ODP.NET, Managed Driver
Assembly Oracle.DataAccess.dll Oracle.ManagedDataAccess.dll
Namespace Oracle.DataAccess.Types Oracle.ManagedDataAccess.Types
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5 4.0, 4.5

Thread Safety

All public static methods are thread-safe, although instance methods do not guarantee thread safety.

Remarks

A OracleBoolean structure represents three possible values: TRUE, FALSE, and NULL. A non-zero value is interpreted as TRUE.

Example

// C#
using System;
using System.Data;
using Oracle.DataAccess.Types;
 
 class OracleBooleanSample
 {
    static void Main(string[] args)
    {
      OracleBoolean oracleBoolean1 = new OracleBoolean(true);
      OracleBoolean oracleBoolean2 = new OracleBoolean(0);
 
      Console.WriteLine("oracleBoolean1 : " + oracleBoolean1);
      Console.WriteLine("oracleBoolean2 : " + oracleBoolean2);
    }
 }

OracleBoolean Members

OracleBoolean members are listed in the following tables:

OracleBoolean Constructors

OracleBoolean constructors are listed in Table 14-14

Table 14-14 OracleBoolean Constructors

Constructor Description

OracleBoolean Constructors

Instantiates a new instance of OracleBoolean structure (Overloaded)


OracleBoolean Static Fields

The OracleBoolean static fields are listed in Table 14-15.

Table 14-15 OracleBoolean Static Fields

Field Description

False

Represents a false value that can be assigned to an OracleBoolean instance

Null

Represents a null value that can be assigned to an OracleBoolean instance

One

Indicates a constant representing the positive one value

True

Represents a true value that can be assigned to an OracleBoolean instance

Zero

Indicates a constant representing the zero value


OracleBoolean Static Methods

OracleBoolean static methods are listed in Table 14-16

Table 14-16 OracleBoolean Static Methods

Methods Description

And

Returns the result of bitwise AND operation of two OracleBoolean instances

Equals

Determines whether or not the two OracleBoolean values are equal

GreaterThan

Determines whether or not the first of two OracleBoolean values is greater than the second

GreaterThanOrEquals

Determines whether or not the first of two OracleBoolean values is greater than or equal to the second

LessThan

Determines whether or not the first of two OracleBoolean values is less than the second

LessThanOrEquals

Determines whether or not the first of two OracleBoolean values is less than or equal to the second

NotEquals

Determines whether or not two OracleBoolean values are not equal

OnesComplement

Returns the result of a one's complement operation on the specified OracleBoolean value

Or

Returns the result of bitwise OR operation of two OracleBoolean instances

Parse

Returns an OracleBoolean structure and sets its value using a string

Xor

Returns the result of a bitwise exclusive OR operation of two OracleBoolean instances


OracleBoolean Static Operators

The OracleBoolean static operators are listed in Table 14-17.

Table 14-17 OracleBoolean Static Operators

Field Description

operator >

Determines whether or not the first of two OracleBoolean values is greater than the second

operator >=

Determines whether or not the first of two OracleBoolean values is greater than or equal to the second

operator <

Determines whether or not the first of two OracleBoolean values is less than the second

operator <=

Dtermines whether or not the first of two OracleBoolean values is less than or equal to the second

operator ==

Indicates whether or not the two OracleBoolean instances are equal

operator !=

Determines whether or not two OracleBoolean values are not equal

operator !

Determines the result of a NOT operation on a OracleBoolean

operator ~

Returns the result of a one's complement operation on the specified OracleBoolean value

operator false

Determines whether or not the specified OracleBoolean value is false

operator true

Determines whether or not the specified OracleBoolean value is true

operator &

Returns the result of bitwise AND operation of two OracleBoolean instances

operator |

Returns the result of bitwise OR operation of two OracleBoolean instances

operator ^

Returns the result of bitwise exclusive OR operation of two OracleBoolean instances


The OracleBoolean Static Type conversions

The OracleBoolean static type conversions are listed in Table 14-18

Table 14-18 OracleBoolean Static Type Conversions

Field Description

implicit operator OracleBoolean

Returns the OracleBoolean representation of a boolean value

explicit operator bool

Returns the boolean representation of the OracleBoolean value

explicit operator OracleBoolean

Converts a structure to an OracleBoolean structure (Overloaded)


OracleBoolean Properties

The OracleBoolean properties are listed in Table 14-25.

Table 14-19 OracleBoolean Properties

Properties Description

ByteValue

Returns a byte that represents the OracleBoolean structure

IsFalse

Indicates whether or not the value of the current instance is false

IsNull

Indicates whether or not the current instance has a null value

IsTrue

Indicates whether or not the value of the current instance is true

Value

Returns a boolean value that represents the current instance


OracleBoolean Instance Methods

The OracleBoolean instance methods are listed in Table 14-20.

Table 14-20 OracleBoolean Instance Methods

Method Description

CompareTo

Compares the current instance to the supplied object and returns an integer that represents their relative values

Equals

Determines whether or not an object is an instance of OracleBoolean, and whether or not the value of the object is equal to the current instance

GetHashCode

Returns a hash code for the current instance

ToString

Returns the string representation of the current instance



OracleBoolean Constructors

The OracleBoolean constructors instantiates a new instance of the OracleBoolean structure.

Overload List:

  • OracleBoolean(bool)

    This constructor creates a new instance of the OracleBoolean structure and sets its value to the supplied Boolean value.

  • OracleBoolean(int)

    This constructor creates a new instance of the OracleBoolean structure and sets its value to the supplied Int32 value.

OracleBoolean(bool)

This constructor creates a new instance of the OracleBoolean structure and sets its value to the supplied Boolean value.

Declaration

// C#
public OracleBoolean(bool value) ;

Parameters

  • value

    The provided Boolean value.

OracleBoolean(int)

This constructor creates a new instance of the OracleBoolean structure and sets its value to the supplied Int32 value.

Declaration

// C#
public OracleBoolean(int value)

Parameters

  • value

    The provided Int32 value.


OracleBoolean Static Fields

The OracleBoolean static fields are listed in Table 14-21.

Table 14-21 OracleBoolean Static Fields

Field Description

False

Represents a false value that can be assigned to an OracleBoolean instance

Null

Represents a null value that can be assigned to an OracleBoolean instance

One

Indicates a constant representing the positive one value

True

Represents a true value that can be assigned to an OracleBoolean instance

Zero

Indicates a constant representing the zero value


False

This static field represents a false value that can be assigned to an OracleBoolean instance.

Declaration

// C#
public static readonly OracleBoolean False;

Null

This static field represents a null value that can be assigned to an OracleBoolean instance.

Declaration

// C#
public static readonly OracleBoolean Null;

One

This static field indicates a constant representing the positive one value.

Declaration

// C#
public static readonly OracleBoolean One;

True

This static field represents a true value that can be assigned to an OracleBoolean instance.

Declaration

// C#
public static readonly OracleBoolean True;

Zero

This static field indicates a constant representing the zero value.

Declaration

// C#
public static readonly OracleBoolean Zero;

OracleBoolean Static Methods

OracleBoolean static methods are listed in Table 14-22

Table 14-22 OracleBoolean Static Methods

Methods Description

And

Returns the result of bitwise AND operation of two OracleBoolean instances

Equals

Determines whether or not the two OracleBoolean values are equal

GreaterThan

Determines whether or not the first of two OracleBoolean values is greater than the second

GreaterThanOrEquals

Determines whether or not the first of two OracleBoolean values is greater than or equal to the second

LessThan

Determines whether or not the first of two OracleBoolean values is less than the second

LessThanOrEquals

Determines whether or not the first of two OracleBoolean values is less than or equal to the second

NotEquals

Determines whether or not two OracleBoolean values are not equal

OnesComplement

Returns the result of a one's complement operation on the specified OracleBoolean value

Or

Returns the result of bitwise OR operation of two OracleBoolean instances

Parse

Returns an OracleBoolean structure and sets its value using a string

Xor

Returns the result of a bitwise exclusive OR operation of two OracleBoolean instances


And

This method returns the result of bitwise AND operation of two OracleBoolean instances.

Declaration

// C#
public static OracleBoolean And(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of bitwise AND operation of two OracleBoolean instances.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

Equals

This method returns an OracleBoolean that indicates whether or not the two OracleBoolean instances are equal.

Declaration

// C#
public static OracleBoolean Equal(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if the specified two OracleBoolean instances are equal; otherwise, returns an OracleBoolean that is false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

GreaterThan

This method determines if the first of two OracleBoolean values is greater than the second.

Declaration

// C#
public static OracleBoolean GreaterThan(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    The first OracleBoolean

  • value2

    The second OracleBoolean

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is greater than the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

GreaterThanOrEquals

This method determines if the first of two OracleBoolean values is greater than or equal to the second.

Declaration

// C#
public static OracleBoolean GreaterThanOrEquals(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    The first OracleBoolean

  • value2

    The second OracleBoolean

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is greater than or equal to the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

LessThan

This method determines if the first of two OracleBoolean values is less than the second.

Declaration

// C#
public static OracleBoolean LessThan(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    The first OracleBoolean

  • value2

    The second OracleBoolean

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is less than the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

LessThanOrEquals

This method determines if the first of two OracleBoolean values is less or equal than the second.

Declaration

// C#
public static OracleBoolean LessThanOrEquals(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    The first OracleBoolean

  • value2

    The second OracleBoolean

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is less than or equal to the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

NotEquals

This method determines if two OracleBoolean values are not equal.

Declaration

// C#
public static OracleBoolean NotEquals(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    The first OracleBoolean

  • value2

    The second OracleBoolean

Return Value

An OracleBoolean that is true if two OracleBoolean values are not equal; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

OnesComplement

This method returns the result of a one's complement operation on the specified OracleBoolean value.

Declaration

// C#
public static OracleBoolean OnesComplement(OracleBoolean value1);

Parameters

  • value1

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of a one's complement operation on the specified OracleBoolean value.

Remarks

If the specified OracleBoolean instance is null, an OracleBoolean with a null value will be returned.

Or

This method returns the result of bitwise OR operation of two OracleBoolean instances.

Declaration

// C#
public static OracleBoolean Or(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of bitwise OR operation of two OracleBoolean instances.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

Parse

This method converts a string to an OracleBoolean.

Declaration

// C#
public static OracleBoolean Parse(string str);

Parameters

  • str

    The string being converted.

Return Value

A new OracleBoolean structure.

Exceptions

ArgumentNullException – The str parameter is null.

IndexOutOfRangeException – The str parameter is an empty string.

Xor

This method returns the result of a bitwise exclusive OR operation of two OracleBoolean instances.

Declaration

// C#
public static OracleBoolean Xor(OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of bitwise exclusive OR operation of two OracleBoolean instances.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.


OracleBoolean Static Operators

The OracleBoolean static operators are listed in Table 14-23.

Table 14-23 OracleBoolean Static Operators

Field Description

operator >

Determines whether or not the first of two OracleBoolean values is greater than the second

operator >=

Determines whether or not the first of two OracleBoolean values is greater than or equal to the second

operator <

Determines whether or not the first of two OracleBoolean values is less than the second

operator <=

Dtermines whether or not the first of two OracleBoolean values is less than or equal to the second

operator ==

Indicates whether or not the two OracleBoolean instances are equal

operator !=

Determines whether or not two OracleBoolean values are not equal

operator !

Determines the result of a NOT operation on a OracleBoolean

operator ~

Returns the result of a one's complement operation on the specified OracleBoolean value

operator false

Determines whether or not the specified OracleBoolean value is false

operator true

Determines whether or not the specified OracleBoolean value is true

operator &

Returns the result of bitwise AND operation of two OracleBoolean instances

operator |

Returns the result of bitwise OR operation of two OracleBoolean instances

operator ^

Returns the result of bitwise exclusive OR operation of two OracleBoolean instances


operator >

This method determines whether or not the first of two OracleBoolean values is greater than the second.

Declaration

// C#
public static operator  > (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is greater than the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator >=

This method determines whether or not the first of two OracleBoolean values is greater than or equal to the second.

Declaration

// C#
public static operator  >= (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is greater than or equal to the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator <

This method determines whether or not the first of two OracleBoolean values is less than the second.

Declaration

// C#
public static operator  < (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is less than the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator <=

This method determines whether or not the first of two OracleBoolean values is less than or equal to the second.

Declaration

// C#
public static operator  <= (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if the first of two OracleBoolean values is less than or equal to the second; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator ==

This method returns an OracleBoolean that indicates whether or not the two OracleBoolean instances are equal.

Declaration

// C#
public static operator  == (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if the specified two OracleBoolean instances are equal; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator !=

This method determines whether or not two OracleBoolean values are not equal.

Declaration

// C#
public static operator  != (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if two OracleBoolean values are not equal; otherwise, returns false.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator !

This method determines the result of a NOT operation on a OracleBoolean.

Declaration

// C#
public static operator  ! (OracleBoolean value1);

Parameters

  • value1

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if the specified OracleBoolean value is true; otherwise, returns false.

Remarks

If the specified OracleBoolean instance is null, an OracleBoolean with a null value will be returned.

operator ~

This method returns the result of a one's complement operation on the specified OracleBoolean value.

Declaration

// C#
public static operator ~ (OracleBoolean value1);

Parameters

  • value1

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of a one's complement operation on the specified OracleBoolean value.

Remarks

If the specified OracleBoolean instance is null, an OracleBoolean with a null value will be returned.

operator false

This method determines whether or not the specified OracleBoolean value is false.

Declaration

// C#
public static operator false (OracleBoolean value1);

Parameters

  • value1

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if specified OracleBoolean value is false; otherwise, returns false.

Remarks

This property will return false if the current instance is null.

operator true

This method determines whether or not the specified OracleBoolean value is true.

Declaration

// C#
public static operator true (OracleBoolean value1);

Parameters

  • value1

    An OracleBoolean instance

Return Value

An OracleBoolean that is true if specified OracleBoolean value is true; otherwise, returns false.

Remarks

This property will return false if the current instance is null.

operator &

This method returns the result of bitwise AND operation of two OracleBoolean instances.

Declaration

// C#
public static operator & (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of bitwise AND operation of two OracleBoolean instances.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator |

This method returns the result of bitwise OR operation of two OracleBoolean instances.

Declaration

// C#
public static operator | (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of bitwise OR operation of two OracleBoolean instances.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.

operator ^

This method returns the result of bitwise exclusive OR operation of two OracleBoolean instances.

Declaration

// C#
public static operator ^ (OracleBoolean value1, OracleBoolean value2);

Parameters

  • value1

    An OracleBoolean instance

  • value2

    An OracleBoolean instance

Return Value

An OracleBoolean that contains the value of the result of bitwise exclusive OR operation of two OracleBoolean instances.

Remarks

If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.


OracleBoolean Static Type Conversions

The OracleBoolean static type conversions are listed in Table 14-24

Table 14-24 OracleBoolean Static Type Conversions

Field Description

implicit operator OracleBoolean

Returns the OracleBoolean representation of a boolean value

explicit operator bool

Returns the boolean representation of the OracleBoolean value

explicit operator OracleBoolean

Converts a structure to an OracleBoolean structure (Overloaded)


implicit operator OracleBoolean

This method returns the OracleBoolean representation of a boolean value.

Declaration

// C#
public static implicit operator OracleBoolean(bool value1);

Parameters

  • value1

    An OracleBoolean instance

Return Value

An OracleBoolean.

explicit operator bool

This method returns the boolean representation of the OracleBoolean value.

Declaration

// C#
public static explicit operator bool(OracleBoolean value1);

Parameters

  • value1

    An OracleBoolean structure

Return Value

A boolean

Exception

OracleNullValueExceptionOracleBoolean has a null value.

explicit operator OracleBoolean

explicit operator OracleBoolean converts the provided structure to an OracleBoolean structure.

Overload List

explicit operator OracleBoolean(byte)

This method converts the supplied byte to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(byte value1);

Parameters

  • value1

    A byte

Return Value

An OracleBoolean structure.

explicit operator OracleBoolean(Decimal)

This method converts the supplied Decimal to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(Decimal value1);

Parameters

  • value1

    A Decimal

Return Value

An OracleBoolean structure.

explicit operator OracleBoolean(Double)

This method converts the supplied Double to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(Double value1);

Parameters

  • value1

    A Double

Return Value

An OracleBoolean structure.

explicit operator OracleBoolean(Int16)

This method converts the supplied Int16 to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(Int16 value1);

Parameters

  • value1

    An Int16

Return Value

An OracleBoolean structure.

explicit operator OracleBoolean(int)

This method converts the supplied int to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(int value1);

Parameters

  • value1

    An int

Return Value

An OracleBoolean structure.

explicit operator OracleBoolean(Int64)

This method converts the supplied Int64 to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(Int64 value1);

Parameters

  • value1

    An Int64

Return Value

An OracleBoolean structure.

explicit operator OracleBoolean(Single)

This method converts the supplied Single to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(Single value1);

Parameters

  • value1

    A Single

Return Value

An OracleBoolean structure.

explicit operator OracleBoolean(String)

This method converts the supplied String to an OracleBoolean structure.

Declaration

// C#
public static explicit operator OracleBoolean(String value1);

Parameters

  • value1

    A String

Return Value

An OracleBoolean structure.


OracleBoolean Properties

The OracleBoolean properties are listed in Table 14-25.

Table 14-25 OracleBoolean Properties

Properties Description

ByteValue

Returns a byte that represents the OracleBoolean structure

IsFalse

Indicates whether or not the value of the current instance is false

IsNull

Indicates whether or not the current instance has a null value

IsTrue

Indicates whether or not the value of the current instance is true

Value

Returns a boolean value that represents the current instance


ByteValue

This property returns a byte that represents the OracleBoolean structure.

Declaration

// C#
public byte ByteValue {get;}

Property Value

A byte that represents the value of OracleBoolean structure.

Exceptions

OracleNullValueException – The current instance has a null value.

IsFalse

This property indicates whether or not the value of the current instance is false.

Declaration

// C#
public bool IsFalse {get;}

Property Value

A bool value that returns true if the current instance is false; otherwise, returns false.

Remarks

This property will return false if the current instance is null.

IsNull

This property indicates whether or not the current instance has a null value.

Declaration

// C#
public bool IsNull {get;}

Property Value

A bool value that returns true if the current instance has a null value; otherwise, returns false.

IsTrue

This property indicates whether or not the value of the current instance is true.

Declaration

// C#
public bool IsTrue {get;}

Property Value

A bool value that returns true if the current instance is true; otherwise, returns false.

Remarks

This property will return false if the current instance is null.

Value

This property returns a boolean value that represents the current instance.

Declaration

// C#
public bool Value {get;}

Property Value

A bool value that returns true if the current instance is true; otherwise, returns false.

Exceptions

OracleNullValueException – The current instance has a null value.


OracleBoolean Instance Methods

The OracleBoolean instance methods are listed in Table 14-26.

Table 14-26 OracleBoolean Instance Methods

Method Description

CompareTo

Compares the current instance to the supplied object and returns an integer that represents their relative values

Equals

Determines whether or not an object is an instance of OracleBoolean, and whether or not the value of the object is equal to the current instance

GetHashCode

Returns a hash code for the current instance

ToString

Returns the string representation of the current instance


CompareTo

This method compares the current instance to the supplied object and returns an integer that represents their relative values.

Declaration

// C#
public int CompareTo(object obj);

Parameter

  • obj

    The supplied instance.

Return Value

The method returns a number:

  • Less than zero: if the value of the current instance is less than obj.

  • Zero: if the value of the current instance is equal to obj.

  • Greater than zero: if the value of the current instance is greater than obj.

Implements

IComparable

Exceptions

ArgumentException - The parameter is not of type OracleBoolean.

Remarks

The following rules apply to the behavior of this method.

  • The comparison must be between OracleBoolean. For example, comparing an OracleBoolean instance with an OracleBinary instance is not allowed. When an OracleBoolean is compared with a different type, an ArgumentException is thrown.

  • Any OracleBoolean that has a value compares greater than an OracleBoolean that has a null value.

  • Two OracleBoolean that contain a null value are equal.

Equals

Overrides Object

This method determines whether or not an object is an instance of OracleBoolean, and whether or not the value of the object is equal to the current instance.

Declaration

// C#
public override bool Equals(object obj);

Parameter

  • obj

    An OracleBoolean instance.

Return Value

Returns true if obj is an instance of OracleBoolean, and the value of obj is equal to the current instance; otherwise, returns false.

Remarks

The following rules apply to the behavior of this method.

  • Any OracleBoolean that has a value compares greater than an OracleBoolean that has a null value.

  • Two OracleBooleans that contain a null value are equal.

GetHashCode

Overrides Object

This method returns a hash code for the current instance.

Declaration

// C#
public override int GetHashCode();

Return Value

Returns a hash code.

ToString

Overrides Object

This method returns the string representation of the current instance.

Declaration

// C#
public override string ToString();

Return Value

Returns the OracleBoolean value in a string representation.

Remarks

If the current instance has a null value, the returned string is null.