3 overrides of DecimalValue
Microsoft.CodeAnalysis (3)
ConstantValueSpecialized.cs (3)
251public override decimal DecimalValue 401public override decimal DecimalValue 578public override decimal DecimalValue
52 references to DecimalValue
Microsoft.CodeAnalysis (6)
ConstantValue.cs (3)
531case ConstantValueTypeDiscriminator.Decimal: return Boxes.Box(DecimalValue); 588return DecimalValue < 0; 827ConstantValueTypeDiscriminator.Decimal => DecimalValue.ToString(provider),
ConstantValueSpecialized.cs (3)
266return base.Equals(other) && _value == other.DecimalValue; 466return this.Discriminator == other.Discriminator && other.DecimalValue == 0m; 665return this.Discriminator == other.Discriminator && other.DecimalValue == 1m;
Microsoft.CodeAnalysis.CSharp (34)
Binder\Binder_Conversions.cs (3)
1980decimal decimalValue = CheckConstantBounds(destinationType, value.DecimalValue, out _) ? value.DecimalValue : 0m; 2102case ConstantValueTypeDiscriminator.Decimal: return value.DecimalValue;
Binder\Binder_Operators.cs (25)
1473return valueLeft.DecimalValue + valueRight.DecimalValue; 1475return valueLeft.DecimalValue - valueRight.DecimalValue; 1477return valueLeft.DecimalValue * valueRight.DecimalValue; 1479return valueLeft.DecimalValue / valueRight.DecimalValue; 1481return valueLeft.DecimalValue % valueRight.DecimalValue; 2050return valueLeft.DecimalValue == valueRight.DecimalValue; 2070return valueLeft.DecimalValue != valueRight.DecimalValue; 2086return valueLeft.DecimalValue < valueRight.DecimalValue; 2102return valueLeft.DecimalValue > valueRight.DecimalValue; 2118return valueLeft.DecimalValue <= valueRight.DecimalValue; 2134return valueLeft.DecimalValue >= valueRight.DecimalValue; 2882return -value.DecimalValue; 2887return +value.DecimalValue; 3090return valueRight.DecimalValue == 0.0m;
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1945return value.DecimalValue == 0;
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
56var value = constantValue.DecimalValue;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
118AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDecimalConstantAttribute(value.DecimalValue));
Symbols\Source\SourceParameterSymbolBase.cs (1)
86AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDecimalConstantAttribute(defaultValue.DecimalValue));
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
201SpecialType.System_Decimal => compilation.SynthesizeDecimalConstantAttribute(defaultValue.DecimalValue),
Utilities\ValueSetFactory.DecimalTC.cs (1)
33public decimal FromConstantValue(ConstantValue constantValue) => constantValue.IsBad ? 0m : constantValue.DecimalValue;
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
103Assert.Throws<InvalidOperationException>(() => { var c = cv1.DecimalValue; });
Microsoft.CodeAnalysis.VisualBasic (11)
Binding\Binder_SelectCase.vb (2)
713Return lbConstantValue.DecimalValue > ubConstantValue.DecimalValue
Lowering\LocalRewriter\LocalRewriter.vb (1)
710Select Case constValue.DecimalValue
Lowering\LocalRewriter\LocalRewriter_Constant.vb (1)
37nodeValue.DecimalValue.GetBits(isNegative, scale, low, mid, high)
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (2)
360Dim initialValue As Decimal = initialConst.DecimalValue 361Dim limitValue As Decimal = limitConst.DecimalValue
Semantics\Conversions.vb (1)
848sourceValue.DecimalValue,
Semantics\Operators.vb (3)
785Dim value As Decimal = operandValue.DecimalValue 1429Dim leftValue As Decimal = left.DecimalValue 1430Dim rightValue As Decimal = right.DecimalValue
Symbols\Source\SourceParameterSymbolBase.vb (1)
68AddSynthesizedAttribute(attributes, compilation.SynthesizeDecimalConstantAttribute(defaultValue.DecimalValue))