Name

SqlDecimal

Synopsis

A structure that represents a numeric value with a fixed precision and scale and a value between -1038-1 and 1038-1. You can set the precision through the Precision property (which represents the maximum number of digits used), and the scale through the Scale property (which represents the number of decimal places to which the value is resolved).

public struct SqlDecimal : INullable, IComparable {

// Public Constructors

   public SqlDecimal(byte bPrecision, byte bScale, bool fPositive, int[  ] bits);

   public SqlDecimal(byte bPrecision, byte bScale, bool fPositive, int data1, int data2, int data3, int data4);

   public SqlDecimal(decimal value);  

   public SqlDecimal(double dVal);  

   public SqlDecimal(int value);  

   public SqlDecimal(long value);  

// Public Static Fields

   public static readonly byte MaxPrecision;                   // =38

   public static readonly byte MaxScale;                       // =38

   public static readonly SqlDecimal MaxValue;                 // =99999999999999999999999999999999999999

   public static readonly SqlDecimal MinValue;                 // =-99999999999999999999999999999999999999

   public static readonly SqlDecimal Null;                     // =Null

                  // Public Instance Properties

   public byte[  ] BinData{get; } 

   public int[  ] Data{get; } 

   public bool IsNull{get; }                                   // implements INullable

   public bool IsPositive{get; } 

   public byte Precision{get; } 

   public byte Scale{get; } 

   public decimal Value{get; } 

// Public Static Methods

   public static SqlDecimal Abs(SqlDecimal n);  

   public static SqlDecimal Add(SqlDecimal x, SqlDecimal y); public static SqlDecimal  ...

Get ADO.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.