The OracleBoolean structure represents a logical value that is either TRUE or FALSE.
System.Object
System.ValueType
Oracle.DataAccess.Types.OracleBoolean
// C# public struct OracleBoolean : IComparable, INullable, IXmlSerializable
| Provider | ODP.NET, Unmanaged Driver |
| Assembly | Oracle.DataAccess.dll |
| Namespace | Oracle.DataAccess.Types |
| .NET Framework | 3.5, 4.0, 4.5, 4.6 |
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
A OracleBoolean structure represents three possible values: TRUE, FALSE, and NULL. A non-zero value is interpreted as TRUE.
// 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 are listed in the following tables:
OracleBoolean constructors are listed in Table 14-14
Table 14-14 OracleBoolean Constructors
| Constructor | Description |
|---|---|
|
Instantiates a new instance of |
The OracleBoolean static fields are listed in Table 14-15.
Table 14-15 OracleBoolean Static Fields
| Field | Description |
|---|---|
|
Represents a false value that can be assigned to an |
|
|
Represents a null value that can be assigned to an |
|
|
Indicates a constant representing the positive one value |
|
|
Represents a true value that can be assigned to an |
|
|
Indicates a constant representing the zero value |
OracleBoolean static methods are listed in Table 14-16
Table 14-16 OracleBoolean Static Methods
| Methods | Description |
|---|---|
|
Returns the result of bitwise |
|
|
Determines whether or not the two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not two |
|
|
Returns the result of a one's complement operation on the specified |
|
|
Returns the result of bitwise |
|
|
Returns an |
|
|
Returns the result of a bitwise exclusive |
OracleBoolean Static Operators
The OracleBoolean static operators are listed in Table 14-17.
Table 14-17 OracleBoolean Static Operators
| Field | Description |
|---|---|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Dtermines whether or not the first of two |
|
|
Indicates whether or not the two |
|
|
Determines whether or not two |
|
|
Determines the result of a |
|
|
Returns the result of a one's complement operation on the specified |
|
|
Determines whether or not the specified |
|
|
Determines whether or not the specified |
|
|
Returns the result of bitwise |
|
|
Returns the result of bitwise |
|
|
Returns the result of bitwise exclusive |
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 |
|---|---|
|
Returns the |
|
|
Returns the boolean representation of the |
|
|
Converts a structure to an |
The OracleBoolean properties are listed in Table 14-25.
Table 14-19 OracleBoolean Properties
| Properties | Description |
|---|---|
|
Returns a |
|
|
Indicates whether or not the value of the current instance is false |
|
|
Indicates whether or not the current instance has a null value |
|
|
Indicates whether or not the value of the current instance is true |
|
|
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 |
|---|---|
|
Compares the current instance to the supplied object and returns an integer that represents their relative values |
|
|
Determines whether or not an object is an instance of |
|
|
Returns a hash code for the current instance |
|
|
Returns the |
The OracleBoolean constructors instantiates a new instance of the OracleBoolean structure.
This constructor creates a new instance of the OracleBoolean structure and sets its value to the supplied Boolean value.
This constructor creates a new instance of the OracleBoolean structure and sets its value to the supplied Int32 value.
See Also:
This constructor creates a new instance of the OracleBoolean structure and sets its value to the supplied Boolean value.
// C#
public OracleBoolean(bool value) ;
value
The provided Boolean value.
The OracleBoolean static fields are listed in Table 14-21.
Table 14-21 OracleBoolean Static Fields
| Field | Description |
|---|---|
|
Represents a false value that can be assigned to an |
|
|
Represents a null value that can be assigned to an |
|
|
Indicates a constant representing the positive one value |
|
|
Represents a true value that can be assigned to an |
|
|
Indicates a constant representing the zero value |
See Also:
This static field represents a false value that can be assigned to an OracleBoolean instance.
// C# public static readonly OracleBoolean False;
This static field represents a null value that can be assigned to an OracleBoolean instance.
// C# public static readonly OracleBoolean Null;
This static field indicates a constant representing the positive one value.
// C# public static readonly OracleBoolean One;
This static field represents a true value that can be assigned to an OracleBoolean instance.
// C# public static readonly OracleBoolean True;
OracleBoolean static methods are listed in Table 14-22
Table 14-22 OracleBoolean Static Methods
| Methods | Description |
|---|---|
|
Returns the result of bitwise |
|
|
Determines whether or not the two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not two |
|
|
Returns the result of a one's complement operation on the specified |
|
|
Returns the result of bitwise |
|
|
Returns an |
|
|
Returns the result of a bitwise exclusive |
See Also:
This method returns the result of bitwise AND operation of two OracleBoolean instances.
// C# public static OracleBoolean And(OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that contains the value of the result of bitwise AND operation of two OracleBoolean instances.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method returns an OracleBoolean that indicates whether or not the two OracleBoolean instances are equal.
// C# public static OracleBoolean Equal(OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that is true if the specified two OracleBoolean instances are equal; otherwise, returns an OracleBoolean that is false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines if the first of two OracleBoolean values is greater than the second.
// C# public static OracleBoolean GreaterThan(OracleBoolean value1, OracleBoolean value2);
value1
The first OracleBoolean
value2
The second OracleBoolean
An OracleBoolean that is true if the first of two OracleBoolean values is greater than the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines if the first of two OracleBoolean values is greater than or equal to the second.
// C# public static OracleBoolean GreaterThanOrEquals(OracleBoolean value1, OracleBoolean value2);
value1
The first OracleBoolean
value2
The second OracleBoolean
An OracleBoolean that is true if the first of two OracleBoolean values is greater than or equal to the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines if the first of two OracleBoolean values is less than the second.
// C# public static OracleBoolean LessThan(OracleBoolean value1, OracleBoolean value2);
value1
The first OracleBoolean
value2
The second OracleBoolean
An OracleBoolean that is true if the first of two OracleBoolean values is less than the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines if the first of two OracleBoolean values is less or equal than the second.
// C# public static OracleBoolean LessThanOrEquals(OracleBoolean value1, OracleBoolean value2);
value1
The first OracleBoolean
value2
The second OracleBoolean
An OracleBoolean that is true if the first of two OracleBoolean values is less than or equal to the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines if two OracleBoolean values are not equal.
// C# public static OracleBoolean NotEquals(OracleBoolean value1, OracleBoolean value2);
value1
The first OracleBoolean
value2
The second OracleBoolean
An OracleBoolean that is true if two OracleBoolean values are not equal; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method returns the result of a one's complement operation on the specified OracleBoolean value.
// C#
public static OracleBoolean OnesComplement(OracleBoolean value1);
value1
An OracleBoolean instance
An OracleBoolean that contains the value of the result of a one's complement operation on the specified OracleBoolean value.
If the specified OracleBoolean instance is null, an OracleBoolean with a null value will be returned.
This method returns the result of bitwise OR operation of two OracleBoolean instances.
// C# public static OracleBoolean Or(OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that contains the value of the result of bitwise OR operation of two OracleBoolean instances.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method converts a string to an OracleBoolean.
// C#
public static OracleBoolean Parse(string str);
str
The string being converted.
A new OracleBoolean structure.
ArgumentNullException – The str parameter is null.
IndexOutOfRangeException – The str parameter is an empty string.
This method returns the result of a bitwise exclusive OR operation of two OracleBoolean instances.
// C# public static OracleBoolean Xor(OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that contains the value of the result of bitwise exclusive OR operation of two OracleBoolean instances.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
The OracleBoolean static operators are listed in Table 14-23.
Table 14-23 OracleBoolean Static Operators
| Field | Description |
|---|---|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Determines whether or not the first of two |
|
|
Dtermines whether or not the first of two |
|
|
Indicates whether or not the two |
|
|
Determines whether or not two |
|
|
Determines the result of a |
|
|
Returns the result of a one's complement operation on the specified |
|
|
Determines whether or not the specified |
|
|
Determines whether or not the specified |
|
|
Returns the result of bitwise |
|
|
Returns the result of bitwise |
|
|
Returns the result of bitwise exclusive |
See Also:
This method determines whether or not the first of two OracleBoolean values is greater than the second.
// C# public static operator > (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that is true if the first of two OracleBoolean values is greater than the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines whether or not the first of two OracleBoolean values is greater than or equal to the second.
// C# public static operator >= (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that is true if the first of two OracleBoolean values is greater than or equal to the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines whether or not the first of two OracleBoolean values is less than the second.
// C# public static operator < (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that is true if the first of two OracleBoolean values is less than the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines whether or not the first of two OracleBoolean values is less than or equal to the second.
// C# public static operator <= (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that is true if the first of two OracleBoolean values is less than or equal to the second; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method returns an OracleBoolean that indicates whether or not the two OracleBoolean instances are equal.
// C# public static operator == (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that is true if the specified two OracleBoolean instances are equal; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines whether or not two OracleBoolean values are not equal.
// C# public static operator != (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that is true if two OracleBoolean values are not equal; otherwise, returns false.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method determines the result of a NOT operation on a OracleBoolean.
// C#
public static operator ! (OracleBoolean value1);
value1
An OracleBoolean instance
An OracleBoolean that is true if the specified OracleBoolean value is true; otherwise, returns false.
If the specified OracleBoolean instance is null, an OracleBoolean with a null value will be returned.
This method returns the result of a one's complement operation on the specified OracleBoolean value.
// C#
public static operator ~ (OracleBoolean value1);
value1
An OracleBoolean instance
An OracleBoolean that contains the value of the result of a one's complement operation on the specified OracleBoolean value.
If the specified OracleBoolean instance is null, an OracleBoolean with a null value will be returned.
This method determines whether or not the specified OracleBoolean value is false.
// C#
public static operator false (OracleBoolean value1);
value1
An OracleBoolean instance
An OracleBoolean that is true if specified OracleBoolean value is false; otherwise, returns false.
This property will return false if the current instance is null.
This method determines whether or not the specified OracleBoolean value is true.
// C#
public static operator true (OracleBoolean value1);
value1
An OracleBoolean instance
An OracleBoolean that is true if specified OracleBoolean value is true; otherwise, returns false.
This property will return false if the current instance is null.
This method returns the result of bitwise AND operation of two OracleBoolean instances.
// C# public static operator & (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that contains the value of the result of bitwise AND operation of two OracleBoolean instances.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method returns the result of bitwise OR operation of two OracleBoolean instances.
// C# public static operator | (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that contains the value of the result of bitwise OR operation of two OracleBoolean instances.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
This method returns the result of bitwise exclusive OR operation of two OracleBoolean instances.
// C# public static operator ^ (OracleBoolean value1, OracleBoolean value2);
value1
An OracleBoolean instance
value2
An OracleBoolean instance
An OracleBoolean that contains the value of the result of bitwise exclusive OR operation of two OracleBoolean instances.
If either of the specified OracleBoolean instances is null, an OracleBoolean with a null value will be returned.
The OracleBoolean static type conversions are listed in Table 14-24
Table 14-24 OracleBoolean Static Type Conversions
| Field | Description |
|---|---|
|
Returns the |
|
|
Returns the boolean representation of the |
|
|
Converts a structure to an |
See Also:
This method returns the OracleBoolean representation of a boolean value.
// C#
public static implicit operator OracleBoolean(bool value1);
value1
An OracleBoolean instance
An OracleBoolean.
This method returns the boolean representation of the OracleBoolean value.
// C#
public static explicit operator bool(OracleBoolean value1);
value1
An OracleBoolean structure
A boolean
OracleNullValueException – OracleBoolean has a null value.
explicit operator OracleBoolean converts the provided structure to an OracleBoolean structure.
explicit operator OracleBoolean(byte)
This method converts the supplied byte to an OracleBoolean structure.
explicit operator OracleBoolean(Decimal)
This method converts the supplied Decimal to an OracleBoolean structure.
explicit operator OracleBoolean(Double)
This method converts the supplied Double to an OracleBoolean structure.
explicit operator OracleBoolean(Int16)
This method converts the supplied Int16 to an OracleBoolean structure.
explicit operator OracleBoolean(int)
This method converts the supplied int to an OracleBoolean structure.
explicit operator OracleBoolean(Int64)
This method converts the supplied Int64 to an OracleBoolean structure.
explicit operator OracleBoolean(Single)
This method converts the supplied Single to an OracleBoolean structure.
explicit operator OracleBoolean(String)
This method converts the supplied String to an OracleBoolean structure.
This method converts the supplied byte to an OracleBoolean structure.
// C#
public static explicit operator OracleBoolean(byte value1);
value1
A byte
An OracleBoolean structure.
This method converts the supplied Decimal to an OracleBoolean structure.
// C#
public static explicit operator OracleBoolean(Decimal value1);
value1
A Decimal
An OracleBoolean structure.
This method converts the supplied Double to an OracleBoolean structure.
// C#
public static explicit operator OracleBoolean(Double value1);
value1
A Double
An OracleBoolean structure.
This method converts the supplied Int16 to an OracleBoolean structure.
// C#
public static explicit operator OracleBoolean(Int16 value1);
value1
An Int16
An OracleBoolean structure.
This method converts the supplied int to an OracleBoolean structure.
// C#
public static explicit operator OracleBoolean(int value1);
value1
An int
An OracleBoolean structure.
This method converts the supplied Int64 to an OracleBoolean structure.
// C#
public static explicit operator OracleBoolean(Int64 value1);
value1
An Int64
An OracleBoolean structure.
This method converts the supplied Single to an OracleBoolean structure.
// C#
public static explicit operator OracleBoolean(Single value1);
value1
A Single
An OracleBoolean structure.
The OracleBoolean properties are listed in Table 14-25.
Table 14-25 OracleBoolean Properties
| Properties | Description |
|---|---|
|
Returns a |
|
|
Indicates whether or not the value of the current instance is false |
|
|
Indicates whether or not the current instance has a null value |
|
|
Indicates whether or not the value of the current instance is true |
|
|
Returns a boolean value that represents the current instance |
See Also:
This property returns a byte that represents the OracleBoolean structure.
// C#
public byte ByteValue {get;}
A byte that represents the value of OracleBoolean structure.
OracleNullValueException – The current instance has a null value.
This property indicates whether or not the value of the current instance is false.
// C#
public bool IsFalse {get;}
A bool value that returns true if the current instance is false; otherwise, returns false.
This property will return false if the current instance is null.
This property indicates whether or not the current instance has a null value.
// C#
public bool IsNull {get;}
A bool value that returns true if the current instance has a null value; otherwise, returns false.
This property indicates whether or not the value of the current instance is true.
// C#
public bool IsTrue {get;}
A bool value that returns true if the current instance is true; otherwise, returns false.
This property will return false if the current instance is null.
The OracleBoolean instance methods are listed in Table 14-26.
Table 14-26 OracleBoolean Instance Methods
| Method | Description |
|---|---|
|
Compares the current instance to the supplied object and returns an integer that represents their relative values |
|
|
Determines whether or not an object is an instance of |
|
|
Returns a hash code for the current instance |
|
|
Returns the |
See Also:
This method compares the current instance to the supplied object and returns an integer that represents their relative values.
// C#
public int CompareTo(object obj);
obj
The supplied instance.
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.
IComparable
ArgumentException - The parameter is not of type OracleBoolean.
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.
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.
// C#
public override bool Equals(object obj);
obj
An OracleBoolean instance.
Returns true if obj is an instance of OracleBoolean, and the value of obj is equal to the current instance; otherwise, returns false.
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.
Overrides Object
This method returns a hash code for the current instance.
// C# public override int GetHashCode();
Returns a hash code.