SqlDecimal 結構
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示具有固定整數位數和小數位數的數值,介於 - 10^38 +1 和 10^38 - 1 之間。
public value class SqlDecimal : IComparable, System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
public value class SqlDecimal : IComparable, IEquatable<System::Data::SqlTypes::SqlDecimal>, System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
public value class SqlDecimal : IComparable, System::Data::SqlTypes::INullable
public struct SqlDecimal : IComparable, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
public struct SqlDecimal : IComparable, IEquatable<System.Data.SqlTypes.SqlDecimal>, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
public struct SqlDecimal : IComparable, System.Data.SqlTypes.INullable
[System.Serializable]
public struct SqlDecimal : IComparable, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
type SqlDecimal = struct
interface INullable
interface IXmlSerializable
type SqlDecimal = struct
interface INullable
[<System.Serializable>]
type SqlDecimal = struct
interface INullable
interface IXmlSerializable
Public Structure SqlDecimal
Implements IComparable, INullable, IXmlSerializable
Public Structure SqlDecimal
Implements IComparable, IEquatable(Of SqlDecimal), INullable, IXmlSerializable
Public Structure SqlDecimal
Implements IComparable, INullable
- 繼承
- 屬性
- 實作
SqlDecimal具有與對應 .NET Framework Decimal 數據類型不同的基礎數據結構。 Decimal 沒有精確度的概念。 它會使用 3 個 DWORD (12 個字節) 來儲存實際數據,因此最大規模為 28。 數據範圍是 -79,228,162,514,264,337,593,543,950,335 到 79,228,162,514,264,337,593,543,950,335。 SqlDecimal 同時具有有效位數和小數位數。 它會使用 4 個不帶正負號的 4 位元組整數來儲存實際數據,因此精確度和小數位數上限為 38。 數據範圍是 - 10^38 +1 到 10^38 - 1。
Sql |
使用提供的參數,初始化 SqlDecimal 結構的新執行個體。 |
Sql |
使用提供的參數,初始化 SqlDecimal 結構的新執行個體。 |
Sql |
使用提供的 SqlDecimal 值,初始化 Decimal 結構的新執行個體。 |
Sql |
使用提供的雙精度浮點數 (Double) 參數,初始化 SqlDecimal 結構的新執行個體。 |
Sql |
使用提供的整數值,初始化 SqlDecimal 結構的新執行個體。 |
Sql |
使用提供的長整數值,初始化 SqlDecimal 結構的新執行個體。 |
Max |
常數,表示 Precision 屬性的最大可能值。 |
Max |
常數,表示 Scale 屬性的最大值。 |
Max |
常數,表示 SqlDecimal 結構的最大值。 |
Min |
常數,表示 SqlDecimal 結構的最小值。 |
Null |
表示 DBNull,可以指派至 SqlDecimal 類別的執行個體。 |
Bin |
取得這個 SqlDecimal 結構值的二進位表示當作位元組的陣列。 |
Data |
取得這個 SqlDecimal 結構的二進位表示當做整數的陣列。 |
Is |
表示這個 SqlDecimal 結構是否為 Null。 |
Is |
指出這個 Value 結構的 SqlDecimal 是否大於零。 |
Precision |
取得用來表示 Value 屬性的最大位數。 |
Scale |
取得解析 Value 的小數位數數目。 |
Value |
取得 SqlDecimal 結構的值。 這個屬性是唯讀的。 |
IXml |
此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。 |
IXml |
此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。 |
IXml |
此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。 |
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |