25 implementations of TryConvertFromTruncating
System.Private.CoreLib (22)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
823static 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)
1697static bool INumberBase<char>.TryConvertFromTruncating<TOther>(TOther value, out char result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1556static bool INumberBase<decimal>.TryConvertFromTruncating<TOther>(TOther value, out decimal result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1279static bool INumberBase<double>.TryConvertFromTruncating<TOther>(TOther value, out double result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1982static bool INumberBase<Half>.TryConvertFromTruncating<TOther>(TOther value, out Half result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1636static 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)
1023static 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)
1068static 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)
1063static 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)
1087static 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)
1567static bool INumberBase<BFloat16>.TryConvertFromTruncating<TOther>(TOther value, out BFloat16 result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
1379static 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)
1390static 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)
1383static 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)
1344static bool INumberBase<NFloat>.TryConvertFromTruncating<TOther>(TOther value, out NFloat result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
1003static 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)
1276static bool INumberBase<float>.TryConvertFromTruncating<TOther>(TOther value, out float result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1747static 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)
828static 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)
893static 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)
900static 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)
899static bool INumberBase<nuint>.TryConvertFromTruncating<TOther>(TOther value, out nuint result) => TryConvertFromTruncating(value, out result);
System.Runtime.Numerics (3)
System\Numerics\BigInteger.cs (1)
5117static bool INumberBase<BigInteger>.TryConvertFromTruncating<TOther>(TOther value, out BigInteger result) => TryConvertFromTruncating(value, out result);
System\Numerics\Complex.cs (1)
739static bool INumberBase<Complex>.TryConvertFromTruncating<TOther>(TOther value, out Complex result)
System\Numerics\Complex.Generic.cs (1)
1643static 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)
119else 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)" /> 1728if (T.TryConvertFromTruncating(value, out T? realResult) && realResult is not null) 1889return TOther.TryConvertFromTruncating<T>(value.m_real, out result);