25 implementations of TryConvertFromTruncating
System.Private.CoreLib (22)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
814
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)
1690
static bool INumberBase<char>.
TryConvertFromTruncating
<TOther>(TOther value, out char result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1542
static bool INumberBase<decimal>.
TryConvertFromTruncating
<TOther>(TOther value, out decimal result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1242
static bool INumberBase<double>.
TryConvertFromTruncating
<TOther>(TOther value, out double result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1976
static bool INumberBase<Half>.
TryConvertFromTruncating
<TOther>(TOther value, out Half result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1627
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)
1014
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)
1059
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)
1054
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)
1078
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)
1562
static bool INumberBase<BFloat16>.
TryConvertFromTruncating
<TOther>(TOther value, out BFloat16 result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
1370
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)
1381
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)
1374
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)
1335
static bool INumberBase<NFloat>.
TryConvertFromTruncating
<TOther>(TOther value, out NFloat result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
994
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)
1259
static bool INumberBase<float>.
TryConvertFromTruncating
<TOther>(TOther value, out float result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1738
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)
819
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)
884
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)
891
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)
890
static bool INumberBase<nuint>.
TryConvertFromTruncating
<TOther>(TOther value, out nuint result) => TryConvertFromTruncating(value, out result);
System.Runtime.Numerics (3)
System\Numerics\BigInteger.cs (1)
4515
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)
1641
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)
812
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1688
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1540
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1240
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1974
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1625
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
1012
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
1057
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
1052
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
1076
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1560
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
1368
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
1379
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
1372
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (1)
117
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)
1333
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
992
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1257
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1736
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
817
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
882
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
889
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
888
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
System.Runtime.Numerics (5)
System\Numerics\BigInteger.cs (1)
4513
/// <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)
1639
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertFromTruncating
{TOther}(TOther, out TSelf)" />
1726
if (T.
TryConvertFromTruncating
(value, out T? realResult) && realResult is not null)
1887
return TOther.
TryConvertFromTruncating
<T>(value.m_real, out result);