19 implementations of ToDecimal
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
LinkTagHelperTest.cs (1)
1247
public decimal
ToDecimal
(IFormatProvider provider)
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
47
public decimal
ToDecimal
(IFormatProvider provider) => Value.ToDecimal(provider);
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\FormattableTestExtensions.cs (1)
35
public readonly decimal
ToDecimal
(IFormatProvider? provider) => throw new NotSupportedException();
System.Private.CoreLib (16)
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
386
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
242
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
577
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1988
decimal IConvertible.
ToDecimal
(IFormatProvider? provider) => throw InvalidCast(nameof(Decimal));
src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
102
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1094
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
512
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2189
decimal IConvertible.
ToDecimal
(IFormatProvider? provider) => Convert.ToDecimal(GetValue());
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
245
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
260
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
257
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
248
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
507
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
239
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
255
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
254
decimal IConvertible.
ToDecimal
(IFormatProvider? provider)
57 references to ToDecimal
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (1)
337
return ((IConvertible)value).
ToDecimal
(null);
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
47
public decimal ToDecimal(IFormatProvider provider) => Value.
ToDecimal
(provider);
Microsoft.VisualBasic.Core (44)
Microsoft\VisualBasic\CompilerServices\BooleanType.vb (1)
141
Return CBool(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\CompilerServices\ByteType.vb (1)
121
Return CByte(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\CompilerServices\Conversions.vb (14)
139
Return CBool(ValueInterface.
ToDecimal
(Nothing))
282
Return CByte(ValueInterface.
ToDecimal
(Nothing))
429
Return CSByte(ValueInterface.
ToDecimal
(Nothing))
572
Return CShort(ValueInterface.
ToDecimal
(Nothing))
718
Return CUShort(ValueInterface.
ToDecimal
(Nothing))
861
Return CInt(ValueInterface.
ToDecimal
(Nothing))
1006
Return CUInt(ValueInterface.
ToDecimal
(Nothing))
1152
Return CLng(ValueInterface.
ToDecimal
(Nothing))
1299
Return CULng(ValueInterface.
ToDecimal
(Nothing))
1455
Return ValueInterface.
ToDecimal
(Nothing)
1698
Return CSng(ValueInterface.
ToDecimal
(Nothing))
1843
Return CDbl(ValueInterface.
ToDecimal
(Nothing))
2289
Return CStr(ValueInterface.
ToDecimal
(Nothing))
2432
Case TypeCode.Decimal : Return iconv.
ToDecimal
(Nothing)
Microsoft\VisualBasic\CompilerServices\DecimalType.vb (1)
93
Return valueInterface.
ToDecimal
(Nothing)
Microsoft\VisualBasic\CompilerServices\DoubleType.vb (1)
129
Return CDbl(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\CompilerServices\IntegerType.vb (1)
119
Return CInt(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\CompilerServices\LongType.vb (1)
122
Return CLng(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (19)
815
d1 = i1.
ToDecimal
(Nothing)
816
d2 = i2.
ToDecimal
(Nothing)
1013
DecimalResult = -conv.
ToDecimal
(Nothing)
1025
DecimalResult = -conv.
ToDecimal
(Nothing)
1177
Return Not CType(iconv.
ToDecimal
(Nothing), Int64)
1180
Return Not CType(iconv.
ToDecimal
(Nothing), Int64)
1183
Return Not CType(iconv.
ToDecimal
(Nothing), Int64)
1798
d1 = conv1.
ToDecimal
(Nothing)
1800
d2 = conv2.
ToDecimal
(Nothing)
2113
d1 = conv1.
ToDecimal
(Nothing)
2114
d2 = conv2.
ToDecimal
(Nothing)
2417
d1 = conv1.
ToDecimal
(Nothing)
2418
d2 = conv2.
ToDecimal
(Nothing)
2526
Return DivDecimal(ToVBBoolConv(conv1), conv2.
ToDecimal
(Nothing))
2675
d1 = conv1.
ToDecimal
(Nothing)
2678
d2 = conv2.
ToDecimal
(Nothing)
3056
d1 = conv1.
ToDecimal
(Nothing)
3059
d2 = conv2.
ToDecimal
(Nothing)
3677
Return iconv.
ToDecimal
(Nothing)
Microsoft\VisualBasic\CompilerServices\ShortType.vb (1)
120
Return CShort(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\CompilerServices\SingleType.vb (1)
135
Return CSng(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\CompilerServices\StringType.vb (1)
136
Return FromDecimal(ValueInterface.
ToDecimal
(Nothing))
Microsoft\VisualBasic\Conversion.vb (2)
150
Return Fix(ValueInterface.
ToDecimal
(Nothing))
225
Return Int(ValueInterface.
ToDecimal
(Nothing))
System.Data.Common (4)
System\Data\Common\DecimalStorage.cs (2)
194
value = ((IConvertible)value).
ToDecimal
(FormatProvider);
225
_values[record] = ((IConvertible)value).
ToDecimal
(FormatProvider);
System\Data\Common\SQLConvert.cs (1)
539
return ((IConvertible)(string)value).
ToDecimal
(formatProvider);
System\Data\Filter\ConstNode.cs (1)
144
return convertible.
ToDecimal
(NumberFormatInfo.InvariantInfo);
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (7)
158
TypeCode.Decimal => v.
ToDecimal
(provider),
204
return value.
ToDecimal
(provider);
276
return ic.
ToDecimal
(provider);
1666
return value == null ? 0 : ((IConvertible)value).
ToDecimal
(null);
1671
return value == null ? 0 : ((IConvertible)value).
ToDecimal
(provider);
1687
return ((IConvertible)value).
ToDecimal
(null);
1759
return ((IConvertible)value).
ToDecimal
(null);