SqlBoolean SqlBoolean SqlBoolean SqlBoolean Struct

定義

表示要存放在資料庫或從資料庫擷取的 1 或 0 之整數值。Represents an integer value that is either 1 or 0 to be stored in or retrieved from a database.

public value class SqlBoolean : IComparable, System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
[System.Serializable]
public struct SqlBoolean : IComparable, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
type SqlBoolean = struct
    interface INullable
    interface IXmlSerializable
Public Structure SqlBoolean
Implements IComparable, INullable, IXmlSerializable
繼承
SqlBooleanSqlBooleanSqlBooleanSqlBoolean
屬性
實作

備註

任何非零值都會解讀為1。Any non-zero value is interpreted as 1.

SqlBoolean結構和標準布林值之間的主要差異在於, 其中標準布林值有兩個可能的值, truefalse SqlBoolean結構有三個可能的值: TrueFalse、或NullThe key difference between a SqlBoolean structure and a standard Boolean value is that, where a standard Boolean has two possible values, true and false, a SqlBoolean structure has three possible values, True, False, or Null.

建構函式

SqlBoolean(Boolean) SqlBoolean(Boolean) SqlBoolean(Boolean) SqlBoolean(Boolean)

使用提供的布林值,初始化 SqlBoolean 結構的新執行個體。Initializes a new instance of the SqlBoolean structure using the supplied Boolean value.

SqlBoolean(Int32) SqlBoolean(Int32) SqlBoolean(Int32) SqlBoolean(Int32)

使用指定的整數值,初始化 SqlBoolean 結構的新執行個體。Initializes a new instance of the SqlBoolean structure using the specified integer value.

欄位

False False False False

表示可以指派至 Value 結構之執行個體的 SqlBoolean 屬性 false 值。Represents a false value that can be assigned to the Value property of an instance of the SqlBoolean structure.

Null Null Null Null

表示 DBNull,可以指派至 SqlBoolean 結構的執行個體。Represents DBNull that can be assigned to this instance of the SqlBoolean structure.

One One One One

表示可以指派至 ByteValue 結構之執行個體的 SqlBoolean 屬性的一個值。Represents a one value that can be assigned to the ByteValue property of an instance of the SqlBoolean structure.

True True True True

表示可以指派至 Value 結構之執行個體的 SqlBoolean 屬性 true 值。Represents a true value that can be assigned to the Value property of an instance of the SqlBoolean structure.

Zero Zero Zero Zero

表示零值,其可以指派至 ByteValue 結構之執行個體的 SqlBoolean 屬性。Represents a zero value that can be assigned to the ByteValue property of an instance of the SqlBoolean structure.

屬性

ByteValue ByteValue ByteValue ByteValue

取得 SqlBoolean 結構的值做為位元組。Gets the value of the SqlBoolean structure as a byte.

IsFalse IsFalse IsFalse IsFalse

指示目前的 Value 是否為 FalseIndicates whether the current Value is False.

IsNull IsNull IsNull IsNull

表示這個 SqlBoolean 結構是否為 Null。Indicates whether this SqlBoolean structure is null.

IsTrue IsTrue IsTrue IsTrue

取得值,這個值表示目前的 Value 是否為 TrueGets a value that indicates whether the current Value is True.

Value Value Value Value

取得 SqlBoolean 結構的值。Gets the SqlBoolean structure's value. 這個屬性是唯讀的。This property is read-only.

方法

And(SqlBoolean, SqlBoolean) And(SqlBoolean, SqlBoolean) And(SqlBoolean, SqlBoolean) And(SqlBoolean, SqlBoolean)

計算兩個指定 SqlBoolean 結構的位元 AND 運算。Computes the bitwise AND operation of two specified SqlBoolean structures.

CompareTo(SqlBoolean) CompareTo(SqlBoolean) CompareTo(SqlBoolean) CompareTo(SqlBoolean)

將這個 SqlBoolean 物件與提供的 SqlBoolean 物件相比較,並傳回它們相對值的指示。Compares this SqlBoolean object to the supplied SqlBoolean object and returns an indication of their relative values.

CompareTo(Object) CompareTo(Object) CompareTo(Object) CompareTo(Object)

比較這個 SqlBoolean 結構與指定的物件,並傳回它們相對值的指示。Compares this SqlBoolean structure to a specified object and returns an indication of their relative values.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

比較提供的物件參數與 SqlBooleanCompares the supplied object parameter to the SqlBoolean.

Equals(SqlBoolean, SqlBoolean) Equals(SqlBoolean, SqlBoolean) Equals(SqlBoolean, SqlBoolean) Equals(SqlBoolean, SqlBoolean)

比較兩個 SqlBoolean 結構,判斷它們是否相等。Compares two SqlBoolean structures to determine whether they are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回這個執行個體的雜湊碼。Returns the hash code for this instance.

GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet)

傳回指定之 XmlSchemaSet 的 XML 結構描述定義語言 (XSD)。Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

GreaterThan(SqlBoolean, SqlBoolean) GreaterThan(SqlBoolean, SqlBoolean) GreaterThan(SqlBoolean, SqlBoolean) GreaterThan(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體,判斷第一個執行個體是否大於第二個。Compares two instances of SqlBoolean to determine whether the first is greater than the second.

GreaterThanOrEquals(SqlBoolean, SqlBoolean) GreaterThanOrEquals(SqlBoolean, SqlBoolean) GreaterThanOrEquals(SqlBoolean, SqlBoolean) GreaterThanOrEquals(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體,判斷第一個執行個體是否大於或等於第二個。Compares two instances of SqlBoolean to determine whether the first is greater than or equal to the second.

LessThan(SqlBoolean, SqlBoolean) LessThan(SqlBoolean, SqlBoolean) LessThan(SqlBoolean, SqlBoolean) LessThan(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體,判斷第一個執行個體是否小於第二個。Compares two instances of SqlBoolean to determine whether the first is less than the second.

LessThanOrEquals(SqlBoolean, SqlBoolean) LessThanOrEquals(SqlBoolean, SqlBoolean) LessThanOrEquals(SqlBoolean, SqlBoolean) LessThanOrEquals(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體,判斷第一個執行個體是否小於或等於第二個。Compares two instances of SqlBoolean to determine whether the first is less than or equal to the second.

NotEquals(SqlBoolean, SqlBoolean) NotEquals(SqlBoolean, SqlBoolean) NotEquals(SqlBoolean, SqlBoolean) NotEquals(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體是否相等。Compares two instances of SqlBoolean for equality.

OnesComplement(SqlBoolean) OnesComplement(SqlBoolean) OnesComplement(SqlBoolean) OnesComplement(SqlBoolean)

在提供的 SqlBoolean 結構上執行一進位補數運算。Performs a one's complement operation on the supplied SqlBoolean structures.

Or(SqlBoolean, SqlBoolean) Or(SqlBoolean, SqlBoolean) Or(SqlBoolean, SqlBoolean) Or(SqlBoolean, SqlBoolean)

在兩個指定的 SqlBoolean 結構上執行位元 OR 運算。Performs a bitwise OR operation on the two specified SqlBoolean structures.

Parse(String) Parse(String) Parse(String) Parse(String)

將邏輯值之指定的 String 表示轉換成其 SqlBoolean 對等用法。Converts the specified String representation of a logical value to its SqlBoolean equivalent.

ToSqlByte() ToSqlByte() ToSqlByte() ToSqlByte()

將這個 SqlBoolean 結構轉換為 SqlByteConverts this SqlBoolean structure to SqlByte.

ToSqlDecimal() ToSqlDecimal() ToSqlDecimal() ToSqlDecimal()

將這個 SqlBoolean 結構轉換為 SqlDecimalConverts this SqlBoolean structure to SqlDecimal.

ToSqlDouble() ToSqlDouble() ToSqlDouble() ToSqlDouble()

將這個 SqlBoolean 結構轉換為 SqlDoubleConverts this SqlBoolean structure to SqlDouble.

ToSqlInt16() ToSqlInt16() ToSqlInt16() ToSqlInt16()

將這個 SqlBoolean 結構轉換為 SqlInt16Converts this SqlBoolean structure to SqlInt16.

ToSqlInt32() ToSqlInt32() ToSqlInt32() ToSqlInt32()

將這個 SqlBoolean 結構轉換為 SqlInt32Converts this SqlBoolean structure to SqlInt32.

ToSqlInt64() ToSqlInt64() ToSqlInt64() ToSqlInt64()

將這個 SqlBoolean 結構轉換為 SqlInt64Converts this SqlBoolean structure to SqlInt64.

ToSqlMoney() ToSqlMoney() ToSqlMoney() ToSqlMoney()

將這個 SqlBoolean 結構轉換為 SqlMoneyConverts this SqlBoolean structure to SqlMoney.

ToSqlSingle() ToSqlSingle() ToSqlSingle() ToSqlSingle()

將這個 SqlBoolean 結構轉換為 SqlSingleConverts this SqlBoolean structure to SqlSingle.

ToSqlString() ToSqlString() ToSqlString() ToSqlString()

將這個 SqlBoolean 結構轉換為 SqlStringConverts this SqlBoolean structure to SqlString.

ToString() ToString() ToString() ToString()

將這個 SqlBoolean 結構轉換成字串。Converts this SqlBoolean structure to a string.

Xor(SqlBoolean, SqlBoolean) Xor(SqlBoolean, SqlBoolean) Xor(SqlBoolean, SqlBoolean) Xor(SqlBoolean, SqlBoolean)

在提供的參數上執行位元 Exclusive-OR 運算。Performs a bitwise exclusive-OR operation on the supplied parameters.

運算子

BitwiseAnd(SqlBoolean, SqlBoolean) BitwiseAnd(SqlBoolean, SqlBoolean) BitwiseAnd(SqlBoolean, SqlBoolean) BitwiseAnd(SqlBoolean, SqlBoolean)

計算兩個指定 SqlBoolean 結構的位元 AND 運算。Computes the bitwise AND operation of two specified SqlBoolean structures.

BitwiseOr(SqlBoolean, SqlBoolean) BitwiseOr(SqlBoolean, SqlBoolean) BitwiseOr(SqlBoolean, SqlBoolean) BitwiseOr(SqlBoolean, SqlBoolean)

計算其運算元的位元 OR 運算。Computes the bitwise OR of its operands.

Equality(SqlBoolean, SqlBoolean) Equality(SqlBoolean, SqlBoolean) Equality(SqlBoolean, SqlBoolean) Equality(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體是否相等。Compares two instances of SqlBoolean for equality.

ExclusiveOr(SqlBoolean, SqlBoolean) ExclusiveOr(SqlBoolean, SqlBoolean) ExclusiveOr(SqlBoolean, SqlBoolean) ExclusiveOr(SqlBoolean, SqlBoolean)

在提供的參數上執行位元 Exclusive-OR (XOR) 運算。Performs a bitwise exclusive-OR (XOR) operation on the supplied parameters.

Explicit(SqlString to SqlBoolean) Explicit(SqlString to SqlBoolean) Explicit(SqlString to SqlBoolean) Explicit(SqlString to SqlBoolean)

SqlString 參數轉換成 SqlBoolean 結構。Converts the SqlString parameter to a SqlBoolean structure.

Explicit(SqlSingle to SqlBoolean) Explicit(SqlSingle to SqlBoolean) Explicit(SqlSingle to SqlBoolean) Explicit(SqlSingle to SqlBoolean)

SqlSingle 參數轉換成 SqlBoolean 結構。Converts the SqlSingle parameter to a SqlBoolean structure.

Explicit(SqlMoney to SqlBoolean) Explicit(SqlMoney to SqlBoolean) Explicit(SqlMoney to SqlBoolean) Explicit(SqlMoney to SqlBoolean)

SqlMoney 參數轉換成 SqlBoolean 結構。Converts the SqlMoney parameter to a SqlBoolean structure.

Explicit(SqlInt32 to SqlBoolean) Explicit(SqlInt32 to SqlBoolean) Explicit(SqlInt32 to SqlBoolean) Explicit(SqlInt32 to SqlBoolean)

SqlInt32 參數轉換成 SqlBoolean 結構。Converts the SqlInt32 parameter to a SqlBoolean structure.

Explicit(SqlInt64 to SqlBoolean) Explicit(SqlInt64 to SqlBoolean) Explicit(SqlInt64 to SqlBoolean) Explicit(SqlInt64 to SqlBoolean)

SqlInt64 參數轉換成 SqlBoolean 結構。Converts the SqlInt64 parameter to a SqlBoolean structure.

Explicit(SqlDouble to SqlBoolean) Explicit(SqlDouble to SqlBoolean) Explicit(SqlDouble to SqlBoolean) Explicit(SqlDouble to SqlBoolean)

SqlDouble 參數轉換成 SqlBoolean 結構。Converts the SqlDouble parameter to a SqlBoolean structure.

Explicit(SqlInt16 to SqlBoolean) Explicit(SqlInt16 to SqlBoolean) Explicit(SqlInt16 to SqlBoolean) Explicit(SqlInt16 to SqlBoolean)

SqlInt16 參數轉換成 SqlBoolean 結構。Converts the SqlInt16 parameter to a SqlBoolean structure.

Explicit(SqlDecimal to SqlBoolean) Explicit(SqlDecimal to SqlBoolean) Explicit(SqlDecimal to SqlBoolean) Explicit(SqlDecimal to SqlBoolean)

SqlDecimal 參數轉換成 SqlBoolean 結構。Converts the SqlDecimal parameter to a SqlBoolean structure.

Explicit(SqlByte to SqlBoolean) Explicit(SqlByte to SqlBoolean) Explicit(SqlByte to SqlBoolean) Explicit(SqlByte to SqlBoolean)

SqlByte 參數轉換成 SqlBoolean 結構。Converts the SqlByte parameter to a SqlBoolean structure.

Explicit(SqlBoolean to Boolean) Explicit(SqlBoolean to Boolean) Explicit(SqlBoolean to Boolean) Explicit(SqlBoolean to Boolean)

SqlBoolean 轉換成布林。Converts a SqlBoolean to a Boolean.

False(SqlBoolean) False(SqlBoolean) False(SqlBoolean) False(SqlBoolean)

False 運算子可以用來測試 ValueSqlBoolean,判斷它是否為 False。The false operator can be used to test the Value of the SqlBoolean to determine whether it is false.

GreaterThan(SqlBoolean, SqlBoolean) GreaterThan(SqlBoolean, SqlBoolean) GreaterThan(SqlBoolean, SqlBoolean) GreaterThan(SqlBoolean, SqlBoolean)

比較兩個 SqlBoolean 結構,判斷第一個結構是否大於第二個。Compares two SqlBoolean structures to determine whether the first is greater than the second.

GreaterThanOrEqual(SqlBoolean, SqlBoolean) GreaterThanOrEqual(SqlBoolean, SqlBoolean) GreaterThanOrEqual(SqlBoolean, SqlBoolean) GreaterThanOrEqual(SqlBoolean, SqlBoolean)

比較兩個 SqlBoolean 結構,判斷第一個結構是否大於或等於第二個。Compares two SqlBoolean structures to determine whether the first is greater than or equal to the second.

Implicit(Boolean to SqlBoolean) Implicit(Boolean to SqlBoolean) Implicit(Boolean to SqlBoolean) Implicit(Boolean to SqlBoolean)

將提供的位元組值轉換成 SqlBooleanConverts the supplied byte value to a SqlBoolean.

Inequality(SqlBoolean, SqlBoolean) Inequality(SqlBoolean, SqlBoolean) Inequality(SqlBoolean, SqlBoolean) Inequality(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體,判斷它們是否不相等。Compares two instances of SqlBoolean to determine whether they are not equal.

LessThan(SqlBoolean, SqlBoolean) LessThan(SqlBoolean, SqlBoolean) LessThan(SqlBoolean, SqlBoolean) LessThan(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體,判斷第一個執行個體是否小於第二個。Compares two instances of SqlBoolean to determine whether the first is less than the second.

LessThanOrEqual(SqlBoolean, SqlBoolean) LessThanOrEqual(SqlBoolean, SqlBoolean) LessThanOrEqual(SqlBoolean, SqlBoolean) LessThanOrEqual(SqlBoolean, SqlBoolean)

比較 SqlBoolean 的兩個執行個體,判斷第一個執行個體是否小於或等於第二個。Compares two instances of SqlBoolean to determine whether the first is less than or equal to the second.

LogicalNot(SqlBoolean) LogicalNot(SqlBoolean) LogicalNot(SqlBoolean) LogicalNot(SqlBoolean)

SqlBoolean 上執行 NOT 運算。Performs a NOT operation on a SqlBoolean.

OnesComplement(SqlBoolean) OnesComplement(SqlBoolean) OnesComplement(SqlBoolean) OnesComplement(SqlBoolean)

在提供的 SqlBoolean 結構上執行一進位補數運算。Performs a one's complement operation on the supplied SqlBoolean structures.

True(SqlBoolean) True(SqlBoolean) True(SqlBoolean) True(SqlBoolean)

True 運算子可以用來測試 ValueSqlBoolean,判斷它是否為 True。The true operator can be used to test the Value of the SqlBoolean to determine whether it is true.

明確介面實作

IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema()

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

適用於

另請參閱