21 implementations of TryConvertToTruncating
System.Private.CoreLib (19)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
1035
static bool INumberBase<byte>.
TryConvertToTruncating
<TOther>(byte value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1886
static bool INumberBase<char>.
TryConvertToTruncating
<TOther>(char value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1700
static bool INumberBase<decimal>.
TryConvertToTruncating
<TOther>(decimal value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1396
static bool INumberBase<double>.
TryConvertToTruncating
<TOther>(double value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
2075
static bool INumberBase<Half>.
TryConvertToTruncating
<TOther>(Half value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1851
static bool INumberBase<Int128>.
TryConvertToTruncating
<TOther>(Int128 value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
1231
static bool INumberBase<short>.
TryConvertToTruncating
<TOther>(short value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
1298
static bool INumberBase<int>.
TryConvertToTruncating
<TOther>(int value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
1301
static bool INumberBase<long>.
TryConvertToTruncating
<TOther>(long value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
1308
static bool INumberBase<nint>.
TryConvertToTruncating
<TOther>(nint value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1808
static bool INumberBase<BFloat16>.
TryConvertToTruncating
<TOther>(BFloat16 value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1575
static bool INumberBase<NFloat>.
TryConvertToTruncating
<TOther>(NFloat value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
1210
static bool INumberBase<sbyte>.
TryConvertToTruncating
<TOther>(sbyte value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1415
static bool INumberBase<float>.
TryConvertToTruncating
<TOther>(float value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1962
static bool INumberBase<UInt128>.
TryConvertToTruncating
<TOther>(UInt128 value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
1040
static bool INumberBase<ushort>.
TryConvertToTruncating
<TOther>(ushort value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
1111
static bool INumberBase<uint>.
TryConvertToTruncating
<TOther>(uint value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
1112
static bool INumberBase<ulong>.
TryConvertToTruncating
<TOther>(ulong value, [MaybeNullWhen(false)] out TOther result)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
1101
static bool INumberBase<nuint>.
TryConvertToTruncating
<TOther>(nuint value, [MaybeNullWhen(false)] out TOther result)
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
4770
static bool INumberBase<BigInteger>.
TryConvertToTruncating
<TOther>(BigInteger value, [MaybeNullWhen(false)] out TOther result)
System\Numerics\Complex.cs (1)
1991
static bool INumberBase<Complex>.
TryConvertToTruncating
<TOther>(Complex value, [MaybeNullWhen(false)] out TOther result)
42 references to TryConvertToTruncating
System.Private.CoreLib (38)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (2)
611
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1033
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1884
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1341
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1698
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (2)
1116
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1394
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (2)
1807
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
2073
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (2)
1342
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1849
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (2)
718
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1229
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (2)
760
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1296
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (2)
757
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1299
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (2)
770
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1306
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (2)
1447
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1806
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
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 (2)
1269
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1573
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (2)
697
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1208
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (2)
1113
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1413
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (2)
1534
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1960
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (2)
616
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1038
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
681
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1109
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
688
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1110
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
677
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1099
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
System.Runtime.Numerics (4)
System\Numerics\BigInteger.cs (2)
3974
else if (!TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
4768
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />
System\Numerics\Complex.cs (2)
997
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1989
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />