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