SqlMoney SqlMoney SqlMoney SqlMoney Struct

定义

表示要存储在数据库中或要从数据库中检索的货币值,范围介于 -2 63 (或 -922,337,203,685,477.5808) to 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对象存储在ValueThe actual value of the SqlMoney object is stored in Value.

构造函数

SqlMoney(Decimal) SqlMoney(Decimal) SqlMoney(Decimal) SqlMoney(Decimal)

使用指定的 Decimal 值初始化 SqlMoney 类的新实例。Initializes a new instance of the SqlMoney class with the specified Decimal value.

SqlMoney(Double) SqlMoney(Double) SqlMoney(Double) SqlMoney(Double)

使用指定的双精度型值初始化 SqlMoney 类的新实例。Initializes a new instance of the SqlMoney class with specified double value.

SqlMoney(Int32) SqlMoney(Int32) SqlMoney(Int32) SqlMoney(Int32)

用指定的整数值初始化 SqlMoney 类的新实例。Initializes a new instance of the SqlMoney class with the specified integer value.

SqlMoney(Int64) SqlMoney(Int64) SqlMoney(Int64) SqlMoney(Int64)

使用指定的长整型值初始化 SqlMoney 类的新实例。Initializes a new instance of the SqlMoney class with the specified long integer value.

字段

MaxValue MaxValue MaxValue MaxValue

表示可分配给 Value 类实例的 SqlMoney 属性的最大值。Represents the maximum value that can be assigned to the Value property of an instance of the SqlMoney class.

MinValue MinValue MinValue MinValue

表示可分配给 Value 类实例的 SqlMoney 属性的最小值。Represents the minimum value that can be assigned to Value property of an instance of the SqlMoney class.

Null Null Null Null

表示可指派给 DBNull 类的此实例的 SqlMoneyRepresents a DBNull that can be assigned to this instance of the SqlMoney class.

Zero Zero Zero Zero

表示可分配给 Value 类实例的 SqlMoney 属性的零值。Represents the zero value that can be assigned to the Value property of an instance of the SqlMoney class.

属性

IsNull IsNull IsNull IsNull

返回一个布尔值,该值指示此 SqlMoney 结构是否为 null。Returns a Boolean value that indicates whether this SqlMoney structure is null.

Value Value Value Value

获取 SqlMoney 结构的实例的货币值。Gets the monetary value of an instance of the SqlMoney structure. 此属性是只读的。This property is read-only.

方法

Add(SqlMoney, SqlMoney) Add(SqlMoney, SqlMoney) Add(SqlMoney, SqlMoney) Add(SqlMoney, SqlMoney)

计算两个 SqlMoney 参数的和。Calculates the sum of the two SqlMoney parameters.

CompareTo(SqlMoney) CompareTo(SqlMoney) CompareTo(SqlMoney) CompareTo(SqlMoney)

将此 SqlMoney 实例与所提供的 SqlMoney 进行比较,并返回二者相对值的指示值。Compares this SqlMoney instance to the supplied SqlMoney and returns an indication of their relative values.

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

将此 SqlMoney 实例与所提供的 Object 进行比较,并返回二者相对值的指示值。Compares this SqlMoney instance to the supplied Object and returns an indication of their relative values.

Divide(SqlMoney, SqlMoney) Divide(SqlMoney, SqlMoney) Divide(SqlMoney, SqlMoney) Divide(SqlMoney, SqlMoney)

除法运算符将第一个 SqlMoney 参数除以第二个参数。The division operator divides the first SqlMoney parameter by the second.

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

将提供的对象参数与 Value 对象的 SqlMoney 属性进行比较。Compares the supplied object parameter to the Value property of the SqlMoney object.

Equals(SqlMoney, SqlMoney) Equals(SqlMoney, SqlMoney) Equals(SqlMoney, SqlMoney) Equals(SqlMoney, SqlMoney)

对两个 SqlMoney 参数执行逻辑比较,以确定它们是否相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are equal.

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

获取此实例的哈希代码。Gets 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(SqlMoney, SqlMoney) GreaterThan(SqlMoney, SqlMoney) GreaterThan(SqlMoney, 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) GreaterThanOrEqual(SqlMoney, SqlMoney) GreaterThanOrEqual(SqlMoney, SqlMoney) 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) LessThan(SqlMoney, SqlMoney) LessThan(SqlMoney, SqlMoney) 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) LessThanOrEqual(SqlMoney, SqlMoney) LessThanOrEqual(SqlMoney, SqlMoney) 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) Multiply(SqlMoney, SqlMoney) Multiply(SqlMoney, SqlMoney) Multiply(SqlMoney, SqlMoney)

乘法运算符计算两个 SqlMoney 参数的乘积。The multiplication operator calculates the product of the two SqlMoney parameters.

NotEquals(SqlMoney, SqlMoney) NotEquals(SqlMoney, SqlMoney) NotEquals(SqlMoney, SqlMoney) NotEquals(SqlMoney, SqlMoney)

对两个 SqlMoney 参数执行逻辑比较,确定它们是否不相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are not equal.

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

将数字的 String 表示形式转换为其等效的 SqlMoney 形式。Converts the String representation of a number to its SqlMoney equivalent.

Subtract(SqlMoney, SqlMoney) Subtract(SqlMoney, SqlMoney) Subtract(SqlMoney, SqlMoney) Subtract(SqlMoney, SqlMoney)

该减法运算符从第一个 SqlMoney 参数中减去第二个参数。The subtraction operator subtracts the second SqlMoney parameter from the first.

ToDecimal() ToDecimal() ToDecimal() ToDecimal()

SqlMoney 的此实例的值转换为 Decimal 结构。Converts the Value of this instance of SqlMoney as a Decimal structure.

ToDouble() ToDouble() ToDouble() ToDouble()

将此 SqlMoney 结构转换为 DoubleConverts this SqlMoney structure to a Double.

ToInt32() ToInt32() ToInt32() ToInt32()

将此 SqlMoney 结构转换为 Int32Converts this SqlMoney structure to an Int32.

ToInt64() ToInt64() ToInt64() ToInt64()

将此 SqlMoney 结构的值转换为 Int64Converts the Value of this SqlMoney structure to an Int64.

ToSqlBoolean() ToSqlBoolean() ToSqlBoolean() ToSqlBoolean()

将此 SqlMoney 结构转换为 SqlBooleanConverts this SqlMoney structure to SqlBoolean.

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

将此 SqlMoney 结构转换为 SqlByteConverts this SqlMoney structure to SqlByte.

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

将此 SqlMoney 结构转换为 SqlDecimalConverts this SqlMoney structure to SqlDecimal.

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

将此 SqlMoney 结构转换为 SqlDoubleConverts this SqlMoney structure to SqlDouble.

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

将此 SqlMoney 结构转换为 SqlInt16Converts this SqlMoney structure to SqlInt16.

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

将此 SqlMoney 结构转换为 SqlInt32Converts this SqlMoney structure to SqlInt32.

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

将此 SqlMoney 结构转换为 SqlInt64Converts this SqlMoney structure to SqlInt64.

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

将此 SqlMoney 结构转换为 SqlSingleConverts this SqlMoney structure to SqlSingle.

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

将此 SqlMoney 结构转换为 SqlStringConverts this SqlMoney structure to SqlString.

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

SqlMoney 的此实例转换为字符串。Converts this instance of SqlMoney to string.

操作员

Addition(SqlMoney, SqlMoney) Addition(SqlMoney, SqlMoney) Addition(SqlMoney, SqlMoney) Addition(SqlMoney, SqlMoney)

计算两个 SqlMoney 参数的和。Calculates the sum of the two SqlMoney parameters.

Division(SqlMoney, SqlMoney) Division(SqlMoney, SqlMoney) Division(SqlMoney, SqlMoney) Division(SqlMoney, SqlMoney)

除法运算符将第一个 SqlMoney 参数除以第二个参数。The division operator divides the first SqlMoney parameter by the second.

Equality(SqlMoney, SqlMoney) Equality(SqlMoney, SqlMoney) Equality(SqlMoney, SqlMoney) Equality(SqlMoney, SqlMoney)

对两个 SqlMoney 参数执行逻辑比较,以确定它们是否相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are equal.

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

此隐式运算符可将所提供的 SqlBoolean 参数转换为 SqlMoneyThis implicit operator converts the supplied SqlBoolean parameter to SqlMoney.

Explicit(SqlDecimal to SqlMoney) Explicit(SqlDecimal to SqlMoney) Explicit(SqlDecimal to SqlMoney) Explicit(SqlDecimal to SqlMoney)

此运算符将提供的 SqlDecimal 参数转换为 SqlMoneyThis operator converts the supplied SqlDecimal parameter to SqlMoney.

Explicit(SqlDouble to SqlMoney) Explicit(SqlDouble to SqlMoney) Explicit(SqlDouble to SqlMoney) Explicit(SqlDouble to SqlMoney)

此运算符将提供的 SqlDouble 参数转换为 SqlMoneyThis operator converts the supplied SqlDouble parameter to SqlMoney.

Explicit(SqlMoney to Decimal) Explicit(SqlMoney to Decimal) Explicit(SqlMoney to Decimal) Explicit(SqlMoney to Decimal)

将指定的 SqlMoney 结构转换为 DecimalConverts the specified SqlMoney structure to Decimal.

Explicit(SqlSingle to SqlMoney) Explicit(SqlSingle to SqlMoney) Explicit(SqlSingle to SqlMoney) Explicit(SqlSingle to SqlMoney)

此运算符将提供的 SqlSingle 参数转换为 SqlMoneyThis operator converts the supplied SqlSingle parameter to SqlMoney.

Explicit(SqlString to SqlMoney) Explicit(SqlString to SqlMoney) Explicit(SqlString to SqlMoney) Explicit(SqlString to SqlMoney)

此运算符将 SqlString 参数转换为 SqlMoneyThis operator converts the SqlString parameter to SqlMoney.

Explicit(Double to SqlMoney) Explicit(Double to SqlMoney) Explicit(Double to SqlMoney) Explicit(Double to SqlMoney)

此隐式运算符可将所提供的 SqlDouble 参数转换为 SqlMoneyThis implicit operator converts the supplied SqlDouble parameter to SqlMoney.

GreaterThan(SqlMoney, SqlMoney) GreaterThan(SqlMoney, SqlMoney) GreaterThan(SqlMoney, 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) GreaterThanOrEqual(SqlMoney, SqlMoney) GreaterThanOrEqual(SqlMoney, SqlMoney) 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(SqlByte to SqlMoney) Implicit(SqlByte to SqlMoney) Implicit(SqlByte to SqlMoney) Implicit(SqlByte to SqlMoney)

此隐式运算符可将所提供的 SqlByte 参数转换为 SqlMoneyThis implicit operator converts the supplied SqlByte parameter to SqlMoney.

Implicit(SqlInt16 to SqlMoney) Implicit(SqlInt16 to SqlMoney) Implicit(SqlInt16 to SqlMoney) Implicit(SqlInt16 to SqlMoney)

此隐式运算符可将所提供的 SqlInt16 参数转换为 SqlMoneyThis implicit operator converts the supplied SqlInt16 parameter to SqlMoney.

Implicit(SqlInt32 to SqlMoney) Implicit(SqlInt32 to SqlMoney) Implicit(SqlInt32 to SqlMoney) Implicit(SqlInt32 to SqlMoney)

此隐式运算符可将所提供的 SqlInt32 参数转换为 SqlMoneyThis implicit operator converts the supplied SqlInt32 parameter to SqlMoney.

Implicit(SqlInt64 to SqlMoney) Implicit(SqlInt64 to SqlMoney) Implicit(SqlInt64 to SqlMoney) Implicit(SqlInt64 to SqlMoney)

此隐式运算符可将所提供的 SqlInt64 参数转换为 SqlMoneyThis implicit operator converts the supplied SqlInt64 parameter to SqlMoney.

Implicit(Decimal to SqlMoney) Implicit(Decimal to SqlMoney) Implicit(Decimal to SqlMoney) Implicit(Decimal to SqlMoney)

Decimal 参数转换为 SqlMoneyConverts the Decimal parameter to SqlMoney.

Implicit(Int64 to SqlMoney) Implicit(Int64 to SqlMoney) Implicit(Int64 to SqlMoney) Implicit(Int64 to SqlMoney)

此隐式运算符可将所提供的 Int64 参数转换为 SqlMoneyThis implicit operator converts the supplied Int64 parameter to SqlMoney.

Inequality(SqlMoney, SqlMoney) Inequality(SqlMoney, SqlMoney) Inequality(SqlMoney, SqlMoney) Inequality(SqlMoney, SqlMoney)

对两个 SqlMoney 参数执行逻辑比较,确定它们是否不相等。Performs a logical comparison of the two SqlMoney parameters to determine whether they are not equal.

LessThan(SqlMoney, SqlMoney) LessThan(SqlMoney, SqlMoney) LessThan(SqlMoney, SqlMoney) 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) LessThanOrEqual(SqlMoney, SqlMoney) LessThanOrEqual(SqlMoney, SqlMoney) 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) Multiply(SqlMoney, SqlMoney) Multiply(SqlMoney, SqlMoney) Multiply(SqlMoney, SqlMoney)

乘法运算符计算两个 SqlMoney 参数的乘积。The multiplication operator calculates the product of the two SqlMoney parameters.

Subtraction(SqlMoney, SqlMoney) Subtraction(SqlMoney, SqlMoney) Subtraction(SqlMoney, SqlMoney) Subtraction(SqlMoney, SqlMoney)

该减法运算符从第一个 SqlMoney 参数中减去第二个参数。The subtraction operator subtracts the second SqlMoney parameter from the first.

UnaryNegation(SqlMoney) UnaryNegation(SqlMoney) UnaryNegation(SqlMoney) UnaryNegation(SqlMoney)

一元负运算符对 SqlMoney 参数求反。The unary minus operator negates the SqlMoney parameter.

显式界面实现

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.

适用于

另请参阅