20 instantiations of SqlDecimal
System.Data.Common (20)
System\Data\SQLTypes\SQLDecimal.cs (19)
1184return new SqlDecimal(x); 1190return new SqlDecimal(x); 1196return new SqlDecimal(new decimal(x)); 1370SqlDecimal ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos); 1572ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive); 1600ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ActualScale, fResPositive); 1618ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive); 1733SqlDecimal ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos); 1750return x.IsNull ? Null : new SqlDecimal(x.ByteValue); 1756return x.IsNull ? Null : new SqlDecimal(x.Value); 1762return x.IsNull ? Null : new SqlDecimal(x.Value); 1768return x.IsNull ? Null : new SqlDecimal(x.Value); 1774return x.IsNull ? Null : new SqlDecimal(x.Value); 1780return x.IsNull ? Null : new SqlDecimal(x.ToDecimal()); 1789return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 1795return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 3160if (n == new SqlDecimal(0)) 3268n = new SqlDecimal(Math.Pow(dBaseNum, exp)); 3399public static readonly SqlDecimal Null = new SqlDecimal(true);
System\Data\SQLTypes\SQLMoney.cs (1)
81SqlDecimal snum = new SqlDecimal(value);
191 references to SqlDecimal
netstandard (1)
netstandard.cs (1)
580[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlDecimal))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
236[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlDecimal))]
System.Data.Common (187)
System\Data\ColumnTypeConverter.cs (1)
41typeof(SqlDecimal),
System\Data\Common\DataStorage.cs (1)
101typeof(SqlDecimal),
System\Data\Common\SQLConvert.cs (8)
125StorageType.SqlDecimal => (SqlDecimal)value, 130public static SqlDecimal ConvertToSqlDecimal(object value) 135return SqlDecimal.Null; 142StorageType.SqlDecimal => (SqlDecimal)value, 156_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlDecimal)), 186StorageType.SqlDecimal => (SqlDecimal)value, 581return SqlDecimal.Parse((string)value); // parses invariant format and is larger has larger range then Decimal 669return ((SqlDecimal)value).ToString(); // converts using invariant format and is larger has larger range then Decimal
System\Data\Common\SQLTypes\SQLDecimalStorage.cs (22)
16private SqlDecimal[] _values = default!; // Late-initialized 19: base(column, typeof(SqlDecimal), SqlDecimal.Null, SqlDecimal.Null, StorageType.SqlDecimal) 31SqlDecimal sum = 0; 46SqlDecimal meanSum = 0; 58SqlDecimal mean = 0; 104SqlDecimal min = SqlDecimal.MaxValue; 110if ((SqlDecimal.LessThan(_values[record], min)).IsTrue) 121SqlDecimal max = SqlDecimal.MinValue; 127if ((SqlDecimal.GreaterThan(_values[record], max)).IsTrue) 155throw ExprException.Overflow(typeof(SqlDecimal)); 168return _values[recordNo].CompareTo((SqlDecimal)value); 209SqlDecimal newValue = default; 219return ((SqlDecimal)tmp); 227Debug.Assert((value.GetType() == typeof(SqlDecimal)), "wrong input type"); 240return new SqlDecimal[recordCount]; 245SqlDecimal[] typedStore = (SqlDecimal[])store; 252_values = (SqlDecimal[])store;
System\Data\Common\SQLTypes\SQLInt64Storage.cs (1)
46SqlDecimal meanSum = 0;
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (2)
31SqlDecimal sum = 0; 46SqlDecimal meanSum = 0;
System\Data\DataColumn.cs (1)
1620dataType == typeof(SqlDecimal);
System\Data\Filter\UnaryNode.cs (1)
97value = -(SqlDecimal)vl;
System\Data\SQLTypes\SQLBoolean.cs (3)
278public static explicit operator SqlBoolean(SqlDecimal x) 418public SqlDecimal ToSqlDecimal() 420return (SqlDecimal)this;
System\Data\SQLTypes\SQLByte.cs (2)
253public static explicit operator SqlByte(SqlDecimal x) 427public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLDecimal.cs (121)
21public struct SqlDecimal : INullable, IComparable, IXmlSerializable, IEquatable<SqlDecimal> 992public static SqlDecimal Parse(string s) 997return SqlDecimal.Null; 999SqlDecimal snResult = SqlDecimal.Null; 1158/// Writes the TDS (Tabular Data Stream) representation of this <see cref="SqlDecimal" /> to the specified destination. 1162/// <exception cref="SqlNullValueException">Thrown when the <see cref="SqlDecimal" /> is <see langword="null" />.</exception> 1182public static implicit operator SqlDecimal(decimal x) 1188public static explicit operator SqlDecimal(double x) 1194public static implicit operator SqlDecimal(long x) 1200public static explicit operator decimal(SqlDecimal x) 1207public static SqlDecimal operator -(SqlDecimal x) 1213SqlDecimal s = x; 1226public static SqlDecimal operator +(SqlDecimal x, SqlDecimal y) 1370SqlDecimal ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos); 1383public static SqlDecimal operator -(SqlDecimal x, SqlDecimal y) 1421public static SqlDecimal operator *(SqlDecimal x, SqlDecimal y) 1449SqlDecimal ret; 1660public static SqlDecimal operator /(SqlDecimal x, SqlDecimal y) 1733SqlDecimal ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos); 1748public static explicit operator SqlDecimal(SqlBoolean x) 1754public static implicit operator SqlDecimal(SqlByte x) 1760public static implicit operator SqlDecimal(SqlInt16 x) 1766public static implicit operator SqlDecimal(SqlInt32 x) 1772public static implicit operator SqlDecimal(SqlInt64 x) 1778public static implicit operator SqlDecimal(SqlMoney x) 1787public static explicit operator SqlDecimal(SqlSingle x) 1789return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 1793public static explicit operator SqlDecimal(SqlDouble x) 1795return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 1800public static explicit operator SqlDecimal(SqlString x) 1802return x.IsNull ? Null : SqlDecimal.Parse(x.Value); 2366public static SqlDecimal AdjustScale(SqlDecimal n, int digits, bool fRound) 2369return SqlDecimal.Null; 2371SqlDecimal ret = n; 2377public static SqlDecimal ConvertToPrecScale(SqlDecimal n, int precision, int scale) 2383return SqlDecimal.Null; 2385SqlDecimal ret = n; 2429private int LAbsCmp(SqlDecimal snumOp) 2781SqlDecimal snumOp 2806SqlDecimal snumArg1 = this; 2807SqlDecimal snumArg2 = snumOp; 2870public static SqlBoolean operator ==(SqlDecimal x, SqlDecimal y) 2875public static SqlBoolean operator !=(SqlDecimal x, SqlDecimal y) 2880public static SqlBoolean operator <(SqlDecimal x, SqlDecimal y) 2885public static SqlBoolean operator >(SqlDecimal x, SqlDecimal y) 2890public static SqlBoolean operator <=(SqlDecimal x, SqlDecimal y) 2901public static SqlBoolean operator >=(SqlDecimal x, SqlDecimal y) 2918public static SqlDecimal Add(SqlDecimal x, SqlDecimal y) 2923public static SqlDecimal Subtract(SqlDecimal x, SqlDecimal y) 2929public static SqlDecimal Multiply(SqlDecimal x, SqlDecimal y) 2935public static SqlDecimal Divide(SqlDecimal x, SqlDecimal y) 2941public static SqlBoolean Equals(SqlDecimal x, SqlDecimal y) 2947public static SqlBoolean NotEquals(SqlDecimal x, SqlDecimal y) 2953public static SqlBoolean LessThan(SqlDecimal x, SqlDecimal y) 2959public static SqlBoolean GreaterThan(SqlDecimal x, SqlDecimal y) 2965public static SqlBoolean LessThanOrEqual(SqlDecimal x, SqlDecimal y) 2971public static SqlBoolean GreaterThanOrEqual(SqlDecimal x, SqlDecimal y) 3084public static SqlDecimal Abs(SqlDecimal n) 3089return SqlDecimal.Null; 3097public static SqlDecimal Ceiling(SqlDecimal n) 3102return SqlDecimal.Null; 3125public static SqlDecimal Floor(SqlDecimal n) 3130return SqlDecimal.Null; 3153public static SqlInt32 Sign(SqlDecimal n) 3167private static SqlDecimal Round(SqlDecimal n, int lPosition, bool fTruncate) 3170return SqlDecimal.Null; 3244public static SqlDecimal Round(SqlDecimal n, int position) 3251public static SqlDecimal Truncate(SqlDecimal n, int position) 3258public static SqlDecimal Power(SqlDecimal n, double exp) 3263return SqlDecimal.Null; 3286if (value is SqlDecimal i) 3290throw ADP.WrongType(value!.GetType(), typeof(SqlDecimal)); 3293public int CompareTo(SqlDecimal value) 3309value is SqlDecimal other && Equals(other); 3314public bool Equals(SqlDecimal other) => 3324SqlDecimal ssnumTemp; 3367SqlDecimal dec = Parse(reader.ReadElementString()); 3399public static readonly SqlDecimal Null = new SqlDecimal(true); 3401public static readonly SqlDecimal MinValue = SqlDecimal.Parse("-99999999999999999999999999999999999999"); 3402public static readonly SqlDecimal MaxValue = SqlDecimal.Parse("99999999999999999999999999999999999999");
System\Data\SQLTypes\SQLDouble.cs (3)
202public static implicit operator SqlDouble(SqlDecimal x) 345public SqlDecimal ToSqlDecimal() 347return (SqlDecimal)this;
System\Data\SQLTypes\SQLInt16.cs (2)
258public static explicit operator SqlInt16(SqlDecimal x) 430public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLInt32.cs (2)
254public static explicit operator SqlInt32(SqlDecimal x) 445public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLInt64.cs (6)
296public static explicit operator SqlInt64(SqlDecimal x) 301SqlDecimal ssnumTemp = x; 314ulong dwl = SqlDecimal.DWL(ssnumTemp._data1, ssnumTemp._data2); 315if (dwl > SqlDecimal.s_llMax && (ssnumTemp.IsPositive || dwl != 1 + SqlDecimal.s_llMax)) 504public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLMoney.cs (3)
81SqlDecimal snum = new SqlDecimal(value); 366public static explicit operator SqlMoney(SqlDecimal x) 508public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLSingle.cs (3)
203public static implicit operator SqlSingle(SqlDecimal x) 359public SqlDecimal ToSqlDecimal() 361return (SqlDecimal)this;
System\Data\SQLTypes\SQLString.cs (3)
500public static explicit operator SqlString(SqlDecimal x) 658public SqlDecimal ToSqlDecimal() 660return (SqlDecimal)this;
System\Data\TypeLimiter.cs (1)
157typeof(SqlDecimal),
System\Data\xmlsaver.cs (1)
239if (type == typeof(decimal) || type == typeof(SqlDecimal) || type == typeof(SqlMoney))
System.Data.Odbc (2)
System\Data\Odbc\OdbcParameter.cs (1)
545byte precision = ((SqlDecimal)(decimal)value).Precision;
System\Data\Odbc\OdbcParameterHelper.cs (1)
222return ((System.Data.SqlTypes.SqlDecimal)(decimal)value).Precision;