System.Data.SqlTypes.SqlDecimal Structure

Represents a numeric value between - 10^38 +1 and 10^38 - 1, with fixed precision and scale.

See Also: SqlDecimal Members

Syntax

[System.Xml.Serialization.XmlSchemaProvider("GetXsdType")]
public struct SqlDecimal : INullable, IComparable, System.Xml.Serialization.IXmlSerializable

Remarks

System.Data.SqlTypes.SqlDecimal has different underlying data structures from its corresponding .NET Framework decimal data type. decimal has no concept of precision. It uses 3 bytes to store the actual data, and therefore has a maximum scale of 28. The data range is -79,228,162,514,264,337,593,543,950,335 through 79,228,162,514,264,337,593,543,950,335. System.Data.SqlTypes.SqlDecimal has both precision and scale. It uses 4 unsigned 4-byte integers to store the actual data, and therefore has maximum precision and scale of 38. The data range is - 10^38 +1 through 10^38 - 1.

Requirements

Namespace: System.Data.SqlTypes
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0