SqlMoney 結構

定義

表示要存放在資料庫或從資料庫擷取的貨幣值,範圍從 -2 63 (或 -922,337,203,685,477.5808) 到 2 63 -1 (或 +922,337,203,685,477.5807),正確率為貨幣單位的萬分之一。Represents a currency value ranging from -2 63 (or -922,337,203,685,477.5808) to 2 63 -1 (or +922,337,203,685,477.5807) with an accuracy to a ten-thousandth of currency unit to be stored in or retrieved from a database.

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

備註

SqlMoney物件的實際值會儲存在中ValueThe actual value of the SqlMoney object is stored in Value.

建構函式

SqlMoney(Decimal)

使用指定的 Decimal 值,初始化 SqlMoney 類別的新執行個體。Initializes a new instance of the SqlMoney class with the specified Decimal value.

SqlMoney(Double)

使用指定的雙精度浮點數 (Double) 值,初始化 SqlMoney 類別的新執行個體。Initializes a new instance of the SqlMoney class with specified double value.

SqlMoney(Int32)

使用指定的整數值,初始化 SqlMoney 類別的新執行個體。Initializes a new instance of the SqlMoney class with the specified integer value.

SqlMoney(Int64)

使用指定的長整數 (Long Integer) 值,初始化 SqlMoney 類別的新執行個體。Initializes a new instance of the SqlMoney class with the specified long integer value.

欄位

MaxValue

表示可以指派至 Value 類別之執行個體的 SqlMoney 屬性的最大值。Represents the maximum value that can be assigned to the Value property of an instance of the SqlMoney class.

MinValue

表示可以指派至 Value 類別之執行個體的 SqlMoney 屬性的最小值。Represents the minimum value that can be assigned to Value property of an instance of the SqlMoney class.

Null

表示 DBNull,可以指派至 SqlMoney 類別的執行個體。Represents a DBNull that can be assigned to this instance of the SqlMoney class.

Zero

表示可以指派至 Value 類別之執行個體的 SqlMoney 屬性的零值。Represents the zero value that can be assigned to the Value property of an instance of the SqlMoney class.

屬性

IsNull

傳回布林值,這個值表示這個 SqlMoney 結構是否為 null。Returns a Boolean value that indicates whether this SqlMoney structure is null.

Value

取得 SqlMoney 結構的執行個體之貨幣值。Gets the monetary value of an instance of the SqlMoney structure. 這個屬性是唯讀的。This property is read-only.

方法

Add(SqlMoney, SqlMoney)

計算兩個 SqlMoney 參數的總和。Calculates the sum of the two SqlMoney parameters.

CompareTo(Object)

將這個 SqlMoney 執行個體與提供的 Object 相比較,並傳回它們相對值的指示。Compares this SqlMoney instance to the supplied Object and returns an indication of their relative values.

CompareTo(SqlMoney)

將這個 SqlMoney 執行個體與提供的 SqlMoney 相比較,並傳回它們相對值的指示。Compares this SqlMoney instance to the supplied SqlMoney and returns an indication of their relative values.

Divide(SqlMoney, SqlMoney)

除法運算子用第二個 SqlMoney 參數除第一個參數。The division operator divides the first SqlMoney parameter by the second.

Equals(Object)

將提供的物件參數與 Value 物件的 SqlMoney 屬性相比較。Compares the supplied object parameter to the Value property of the SqlMoney object.

Equals(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷它們是否相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are equal.

GetHashCode()

取得這個執行個體的雜湊程式碼。Gets the hash code for this instance.

GetXsdType(XmlSchemaSet)

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

GreaterThan(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否大於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is greater than the second.

GreaterThanOrEqual(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否大於或等於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is greater than or equal to the second.

LessThan(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否小於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is less than the second.

LessThanOrEqual(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否小於或等於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is less than or equal to the second.

Multiply(SqlMoney, SqlMoney)

乘法運算子計算兩個 SqlMoney 參數的乘積。The multiplication operator calculates the product of the two SqlMoney parameters.

NotEquals(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷它們是否不相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are not equal.

Parse(String)

將數字的 String 表示轉換為其 SqlMoney 對等用法。Converts the String representation of a number to its SqlMoney equivalent.

Subtract(SqlMoney, SqlMoney)

減法運算子從第一個 SqlMoney 參數減去第二個參數。The subtraction operator subtracts the second SqlMoney parameter from the first.

ToDecimal()

將這個 SqlMoney 之執行個體的 Value 轉換為 Decimal 結構。Converts the Value of this instance of SqlMoney as a Decimal structure.

ToDouble()

將這個 SqlMoney 結構轉換成 DoubleConverts this SqlMoney structure to a Double.

ToInt32()

將這個 SqlMoney 結構轉換成 Int32Converts this SqlMoney structure to an Int32.

ToInt64()

將這個 SqlMoney 結構的值轉換成 Int64Converts the Value of this SqlMoney structure to an Int64.

ToSqlBoolean()

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

ToSqlByte()

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

ToSqlDecimal()

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

ToSqlDouble()

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

ToSqlInt16()

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

ToSqlInt32()

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

ToSqlInt64()

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

ToSqlSingle()

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

ToSqlString()

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

ToString()

將這個 SqlMoney 的執行個體轉換成字串。Converts this instance of SqlMoney to string.

運算子

Addition(SqlMoney, SqlMoney)

計算兩個 SqlMoney 參數的總和。Calculates the sum of the two SqlMoney parameters.

Division(SqlMoney, SqlMoney)

除法運算子用第二個 SqlMoney 參數除第一個參數。The division operator divides the first SqlMoney parameter by the second.

Equality(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷它們是否相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are equal.

Explicit(Double to SqlMoney)

這個隱含運算子會將提供的 SqlDouble 參數轉換為 SqlMoneyThis implicit operator converts the supplied SqlDouble parameter to SqlMoney.

Explicit(SqlBoolean to SqlMoney)

這個隱含運算子會將提供的 SqlBoolean 參數轉換為 SqlMoneyThis implicit operator converts the supplied SqlBoolean parameter to SqlMoney.

Explicit(SqlDecimal to SqlMoney)

這個運算子會將提供的 SqlDecimal 參數轉換成 SqlMoneyThis operator converts the supplied SqlDecimal parameter to SqlMoney.

Explicit(SqlDouble to SqlMoney)

這個運算子會將提供的 SqlDouble 參數轉換成 SqlMoneyThis operator converts the supplied SqlDouble parameter to SqlMoney.

Explicit(SqlMoney to Decimal)

將指定的 SqlMoney 結構轉換成 DecimalConverts the specified SqlMoney structure to Decimal.

Explicit(SqlSingle to SqlMoney)

這個運算子會將提供的 SqlSingle 參數轉換成 SqlMoneyThis operator converts the supplied SqlSingle parameter to SqlMoney.

Explicit(SqlString to SqlMoney)

這個運算子會將 SqlString 參數轉換成 SqlMoneyThis operator converts the SqlString parameter to SqlMoney.

GreaterThan(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否大於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is greater than the second.

GreaterThanOrEqual(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否大於或等於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is greater than or equal to the second.

Implicit(Decimal to SqlMoney)

Decimal 參數轉換成 SqlMoneyConverts the Decimal parameter to SqlMoney.

Implicit(Int64 to SqlMoney)

這個隱含運算子會將提供的 Int64 參數轉換為 SqlMoneyThis implicit operator converts the supplied Int64 parameter to SqlMoney.

Implicit(SqlByte to SqlMoney)

這個隱含運算子會將提供的 SqlByte 參數轉換為 SqlMoneyThis implicit operator converts the supplied SqlByte parameter to SqlMoney.

Implicit(SqlInt16 to SqlMoney)

這個隱含運算子會將提供的 SqlInt16 參數轉換為 SqlMoneyThis implicit operator converts the supplied SqlInt16 parameter to SqlMoney.

Implicit(SqlInt32 to SqlMoney)

這個隱含運算子會將提供的 SqlInt32 參數轉換為 SqlMoneyThis implicit operator converts the supplied SqlInt32 parameter to SqlMoney.

Implicit(SqlInt64 to SqlMoney)

這個隱含運算子會將提供的 SqlInt64 參數轉換為 SqlMoneyThis implicit operator converts the supplied SqlInt64 parameter to SqlMoney.

Inequality(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷它們是否不相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are not equal.

LessThan(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否小於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is less than the second.

LessThanOrEqual(SqlMoney, SqlMoney)

執行兩個 SqlMoney 參數的邏輯比對,以判斷第一個參數是否小於或等於第二個。Performs a logical comparison of the two SqlMoney parameters to determine whether the first is less than or equal to the second.

Multiply(SqlMoney, SqlMoney)

乘法運算子計算兩個 SqlMoney 參數的乘積。The multiplication operator calculates the product of the two SqlMoney parameters.

Subtraction(SqlMoney, SqlMoney)

減法運算子從第一個 SqlMoney 參數減去第二個參數。The subtraction operator subtracts the second SqlMoney parameter from the first.

UnaryNegation(SqlMoney)

一元減號運算子將 SqlMoney 變成相反值。The unary minus operator negates the SqlMoney parameter.

明確介面實作

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)

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

IXmlSerializable.WriteXml(XmlWriter)

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

適用於

另請參閱