Επεξεργασία

Κοινή χρήση μέσω


SqlMoney Struct

Definition

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
public value class SqlMoney : IComparable, IEquatable<System::Data::SqlTypes::SqlMoney>, System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
public value class SqlMoney : IComparable, System::Data::SqlTypes::INullable
public struct SqlMoney : IComparable, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
public struct SqlMoney : IComparable, IEquatable<System.Data.SqlTypes.SqlMoney>, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
public struct SqlMoney : IComparable, System.Data.SqlTypes.INullable
[System.Serializable]
public struct SqlMoney : IComparable, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
type SqlMoney = struct
    interface INullable
    interface IXmlSerializable
type SqlMoney = struct
    interface INullable
[<System.Serializable>]
type SqlMoney = struct
    interface INullable
    interface IXmlSerializable
Public Structure SqlMoney
Implements IComparable, INullable, IXmlSerializable
Public Structure SqlMoney
Implements IComparable, IEquatable(Of SqlMoney), INullable, IXmlSerializable
Public Structure SqlMoney
Implements IComparable, INullable
Inheritance
SqlMoney
Attributes
Implements

Remarks

The actual value of the SqlMoney object is stored in Value.

Constructors

SqlMoney(Decimal)

Initializes a new instance of the SqlMoney class with the specified Decimal value.

SqlMoney(Double)

Initializes a new instance of the SqlMoney class with specified double value.

SqlMoney(Int32)

Initializes a new instance of the SqlMoney class with the specified integer value.

SqlMoney(Int64)

Initializes a new instance of the SqlMoney class with the specified long integer value.

Fields

MaxValue

Represents the maximum value that can be assigned to the Value property of an instance of the SqlMoney class.

MinValue

Represents the minimum value that can be assigned to Value property of an instance of the SqlMoney class.

Null

Represents a DBNull that can be assigned to this instance of the SqlMoney class.

Zero

Represents the zero value that can be assigned to the Value property of an instance of the SqlMoney class.

Properties

IsNull

Returns a Boolean value that indicates whether this SqlMoney structure is null.

Value

Gets the monetary value of an instance of the SqlMoney structure. This property is read-only.

Methods

Add(SqlMoney, SqlMoney)

Calculates the sum of the two SqlMoney parameters.

CompareTo(Object)

Compares this SqlMoney instance to the supplied Object and returns an indication of their relative values.

CompareTo(SqlMoney)

Compares this SqlMoney instance to the supplied SqlMoney and returns an indication of their relative values.

Divide(SqlMoney, SqlMoney)

The division operator divides the first SqlMoney parameter by the second.

Equals(Object)

Compares the supplied object parameter to the Value property of the SqlMoney object.

Equals(SqlMoney, SqlMoney)

Performs a logical comparison of the two SqlMoney parameters to determine whether they are equal.

Equals(SqlMoney)

Indicates whether the current instance is equal to another instance of the same type.

FromTdsValue(Int64)

Initializes a new instance of the SqlMoney class with the specified Tabular Data Stream (TDS) long value.

GetHashCode()

Gets the hash code for this instance.

GetTdsValue()

Returns the Tabular Data Stream (TDS) long value that makes up the structure of the SqlMoney instance.

GetXsdType(XmlSchemaSet)

Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

GreaterThan(SqlMoney, SqlMoney)

Performs a logical comparison of the two SqlMoney parameters to determine whether the first is greater than the second.

GreaterThanOrEqual(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)

Performs a logical comparison of the two SqlMoney parameters to determine whether the first is less than the second.

LessThanOrEqual(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)

The multiplication operator calculates the product of the two SqlMoney parameters.

NotEquals(SqlMoney, SqlMoney)

Performs a logical comparison of the two SqlMoney parameters to determine whether they are not equal.

Parse(String)

Converts the String representation of a number to its SqlMoney equivalent.

Subtract(SqlMoney, SqlMoney)

The subtraction operator subtracts the second SqlMoney parameter from the first.

ToDecimal()

Converts the Value of this instance of SqlMoney as a Decimal structure.

ToDouble()

Converts this SqlMoney structure to a Double.

ToInt32()

Converts this SqlMoney structure to an Int32.

ToInt64()

Converts the Value of this SqlMoney structure to an Int64.

ToSqlBoolean()

Converts this SqlMoney structure to SqlBoolean.

ToSqlByte()

Converts this SqlMoney structure to SqlByte.

ToSqlDecimal()

Converts this SqlMoney structure to SqlDecimal.

ToSqlDouble()

Converts this SqlMoney structure to SqlDouble.

ToSqlInt16()

Converts this SqlMoney structure to SqlInt16.

ToSqlInt32()

Converts this SqlMoney structure to SqlInt32.

ToSqlInt64()

Converts this SqlMoney structure to SqlInt64.

ToSqlSingle()

Converts this SqlMoney structure to SqlSingle.

ToSqlString()

Converts this SqlMoney structure to SqlString.

ToString()

Converts this instance of SqlMoney to string.

Operators

Addition(SqlMoney, SqlMoney)

Calculates the sum of the two SqlMoney parameters.

Division(SqlMoney, SqlMoney)

The division operator divides the first SqlMoney parameter by the second.

Equality(SqlMoney, SqlMoney)

Performs a logical comparison of the two SqlMoney parameters to determine whether they are equal.

Explicit(Double to SqlMoney)

This implicit operator converts the supplied SqlDouble parameter to SqlMoney.

Explicit(SqlBoolean to SqlMoney)

This implicit operator converts the supplied SqlBoolean parameter to SqlMoney.

Explicit(SqlDecimal to SqlMoney)

This operator converts the supplied SqlDecimal parameter to SqlMoney.

Explicit(SqlDouble to SqlMoney)

This operator converts the supplied SqlDouble parameter to SqlMoney.

Explicit(SqlMoney to Decimal)

Converts the specified SqlMoney structure to Decimal.

Explicit(SqlSingle to SqlMoney)

This operator converts the supplied SqlSingle parameter to SqlMoney.

Explicit(SqlString to SqlMoney)

This operator converts the SqlString parameter to SqlMoney.

GreaterThan(SqlMoney, SqlMoney)

Performs a logical comparison of the two SqlMoney parameters to determine whether the first is greater than the second.

GreaterThanOrEqual(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)

Converts the Decimal parameter to SqlMoney.

Implicit(Int64 to SqlMoney)

This implicit operator converts the supplied Int64 parameter to SqlMoney.

Implicit(SqlByte to SqlMoney)

This implicit operator converts the supplied SqlByte parameter to SqlMoney.

Implicit(SqlInt16 to SqlMoney)

This implicit operator converts the supplied SqlInt16 parameter to SqlMoney.

Implicit(SqlInt32 to SqlMoney)

This implicit operator converts the supplied SqlInt32 parameter to SqlMoney.

Implicit(SqlInt64 to SqlMoney)

This implicit operator converts the supplied SqlInt64 parameter to SqlMoney.

Inequality(SqlMoney, SqlMoney)

Performs a logical comparison of the two SqlMoney parameters to determine whether they are not equal.

LessThan(SqlMoney, SqlMoney)

Performs a logical comparison of the two SqlMoney parameters to determine whether the first is less than the second.

LessThanOrEqual(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)

The multiplication operator calculates the product of the two SqlMoney parameters.

Subtraction(SqlMoney, SqlMoney)

The subtraction operator subtracts the second SqlMoney parameter from the first.

UnaryNegation(SqlMoney)

The unary minus operator negates the SqlMoney parameter.

Explicit Interface Implementations

IXmlSerializable.GetSchema()

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.ReadXml(XmlReader)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.WriteXml(XmlWriter)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Applies to

See also