OracleBoolean Structure
The OracleBoolean
structure represents a logical value that is either TRUE
or FALSE
.
ODP.NET, Unmanaged Driver can access Oracle Database PL/SQL Booleans in Oracle Database Release 12.1 and later. ODP.NET, Managed Driver can access Oracle Database PL/SQL Booleans in Oracle Database Release 12.2 and later.
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 | ODP.NET Core |
---|---|---|---|
Assembly |
|
|
|
Namespace |
|
|
|
.NET Framework |
3.5, 4.5, 4.6, 4.7 |
4.5, 4.6, 4.7 |
4.6.1 or higher |
.NET Core |
- |
- |
2.1 or higher |
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; // for use with ODP.NET, Unmanaged Driver // using Oracle.ManagedDataAccess.Types; // for use with ODP.NET, Managed Driver 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); } }