25 implementations of TryConvertFromTruncating
System.Private.CoreLib (22)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
823
static bool INumberBase<byte>.
TryConvertFromTruncating
<TOther>(TOther value, out byte result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1697
static bool INumberBase<char>.
TryConvertFromTruncating
<TOther>(TOther value, out char result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1556
static bool INumberBase<decimal>.
TryConvertFromTruncating
<TOther>(TOther value, out decimal result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1279
static bool INumberBase<double>.
TryConvertFromTruncating
<TOther>(TOther value, out double result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1982
static bool INumberBase<Half>.
TryConvertFromTruncating
<TOther>(TOther value, out Half result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1636
static bool INumberBase<Int128>.
TryConvertFromTruncating
<TOther>(TOther value, out Int128 result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
1023
static bool INumberBase<short>.
TryConvertFromTruncating
<TOther>(TOther value, out short result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
1068
static bool INumberBase<int>.
TryConvertFromTruncating
<TOther>(TOther value, out int result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
1063
static bool INumberBase<long>.
TryConvertFromTruncating
<TOther>(TOther value, out long result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
1087
static bool INumberBase<nint>.
TryConvertFromTruncating
<TOther>(TOther value, out nint result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1567
static bool INumberBase<BFloat16>.
TryConvertFromTruncating
<TOther>(TOther value, out BFloat16 result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
1379
static bool INumberBase<Decimal128>.
TryConvertFromTruncating
<TOther>(TOther value, out Decimal128 result) => TryConvertFrom(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
1390
static bool INumberBase<Decimal32>.
TryConvertFromTruncating
<TOther>(TOther value, out Decimal32 result) => TryConvertFrom(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
1383
static bool INumberBase<Decimal64>.
TryConvertFromTruncating
<TOther>(TOther value, out Decimal64 result) => TryConvertFrom(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1344
static bool INumberBase<NFloat>.
TryConvertFromTruncating
<TOther>(TOther value, out NFloat result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
1003
static bool INumberBase<sbyte>.
TryConvertFromTruncating
<TOther>(TOther value, out sbyte result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1276
static bool INumberBase<float>.
TryConvertFromTruncating
<TOther>(TOther value, out float result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1747
static bool INumberBase<UInt128>.
TryConvertFromTruncating
<TOther>(TOther value, out UInt128 result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
828
static bool INumberBase<ushort>.
TryConvertFromTruncating
<TOther>(TOther value, out ushort result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
893
static bool INumberBase<uint>.
TryConvertFromTruncating
<TOther>(TOther value, out uint result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
900
static bool INumberBase<ulong>.
TryConvertFromTruncating
<TOther>(TOther value, out ulong result) => TryConvertFromTruncating(value, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
899
static bool INumberBase<nuint>.
TryConvertFromTruncating
<TOther>(TOther value, out nuint result) => TryConvertFromTruncating(value, out result);
System.Runtime.Numerics (3)
System\Numerics\BigInteger.cs (1)
5117
static bool INumberBase<BigInteger>.
TryConvertFromTruncating
<TOther>(TOther value, out BigInteger result) => TryConvertFromTruncating(value, out result);
System\Numerics\Complex.cs (1)
739
static bool INumberBase<Complex>.
TryConvertFromTruncating
<TOther>(TOther value, out Complex result)
System\Numerics\Complex.Generic.cs (1)
1643
static bool INumberBase<Complex<T>>.
TryConvertFromTruncating
<TOther>(TOther value, out Complex<T> result)
28 references to TryConvertFromTruncating
System.Private.CoreLib (23)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
820
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1694
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1553
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1276
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1979
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1633
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
1020
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
1065
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
1060
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
1084
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1564
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
1376
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
1387
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
1380
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (1)
119
else if (!TSelf.
TryConvertFromTruncating
(value, out result) && !TOther.TryConvertToTruncating<TSelf>(value, out result))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1341
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
1000
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1273
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1744
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
825
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
890
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
897
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
896
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
System.Runtime.Numerics (5)
System\Numerics\BigInteger.cs (1)
5115
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
System\Numerics\Complex.cs (1)
737
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
System\Numerics\Complex.Generic.cs (3)
1641
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
1728
if (T.
TryConvertFromTruncating
(value, out T? realResult) && realResult is not null)
1889
return TOther.
TryConvertFromTruncating
<T>(value.m_real, out result);