20 implementations of TryConvertToTruncating
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
1034static bool INumberBase<byte>.TryConvertToTruncating<TOther>(byte value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1847static bool INumberBase<char>.TryConvertToTruncating<TOther>(char value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1721static bool INumberBase<decimal>.TryConvertToTruncating<TOther>(decimal value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1374static bool INumberBase<double>.TryConvertToTruncating<TOther>(double value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
2076static bool INumberBase<Half>.TryConvertToTruncating<TOther>(Half value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1862static bool INumberBase<Int128>.TryConvertToTruncating<TOther>(Int128 value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
1237static bool INumberBase<short>.TryConvertToTruncating<TOther>(short value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
1279static bool INumberBase<int>.TryConvertToTruncating<TOther>(int value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
1282static bool INumberBase<long>.TryConvertToTruncating<TOther>(long value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
1271static bool INumberBase<nint>.TryConvertToTruncating<TOther>(nint value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1648static bool INumberBase<NFloat>.TryConvertToTruncating<TOther>(NFloat value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
1200static bool INumberBase<sbyte>.TryConvertToTruncating<TOther>(sbyte value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1393static bool INumberBase<float>.TryConvertToTruncating<TOther>(float value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1925static bool INumberBase<UInt128>.TryConvertToTruncating<TOther>(UInt128 value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
1053static bool INumberBase<ushort>.TryConvertToTruncating<TOther>(ushort value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
1098static bool INumberBase<uint>.TryConvertToTruncating<TOther>(uint value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
1091static bool INumberBase<ulong>.TryConvertToTruncating<TOther>(ulong value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
1094static bool INumberBase<nuint>.TryConvertToTruncating<TOther>(nuint value, [MaybeNullWhen(false)] out TOther result)
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
4851static bool INumberBase<BigInteger>.TryConvertToTruncating<TOther>(BigInteger value, [MaybeNullWhen(false)] out TOther result)
System\Numerics\Complex.cs (1)
1955static bool INumberBase<Complex>.TryConvertToTruncating<TOther>(Complex value, [MaybeNullWhen(false)] out TOther result)
38 references to TryConvertToTruncating
System.Private.CoreLib (34)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (2)
610else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1032/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1845/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1362else if (!TryConvertFrom(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1719/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Double.cs (2)
1094else if (!TryConvertFrom(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1372/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Half.cs (2)
1808else if (!TryConvertFrom(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 2074/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1860/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int16.cs (2)
724else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1235/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int32.cs (2)
765else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1277/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int64.cs (2)
762else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1280/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (2)
757else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1269/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (1)
117else if (!TSelf.TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating<TSelf>(value, out result))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1342else if (!TryConvertFrom(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1646/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\SByte.cs (2)
687else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1198/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Single.cs (2)
1091else if (!TryConvertFrom(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1391/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1923/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (2)
629else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1051/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
668else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1096/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
667else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1089/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
670else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1092/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
System.Runtime.Numerics (4)
System\Numerics\BigInteger.cs (2)
4044else if (!TryConvertFromTruncating(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 4849/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />
System\Numerics\Complex.cs (2)
989else if (!TryConvertFrom(value, out result) && !TOther.TryConvertToTruncating(value, out result)) 1953/// <inheritdoc cref="INumberBase{TSelf}.TryConvertToTruncating{TOther}(TSelf, out TOther)" />