20 implementations of TryConvertToTruncating
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
1034
static bool INumberBase<byte>.
TryConvertToTruncating
<TOther>(byte value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1847
static bool INumberBase<char>.
TryConvertToTruncating
<TOther>(char value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1721
static bool INumberBase<decimal>.
TryConvertToTruncating
<TOther>(decimal value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1374
static bool INumberBase<double>.
TryConvertToTruncating
<TOther>(double value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
2076
static bool INumberBase<Half>.
TryConvertToTruncating
<TOther>(Half value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1862
static bool INumberBase<Int128>.
TryConvertToTruncating
<TOther>(Int128 value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
1237
static bool INumberBase<short>.
TryConvertToTruncating
<TOther>(short value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
1279
static bool INumberBase<int>.
TryConvertToTruncating
<TOther>(int value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
1282
static bool INumberBase<long>.
TryConvertToTruncating
<TOther>(long value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
1271
static bool INumberBase<nint>.
TryConvertToTruncating
<TOther>(nint value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1648
static bool INumberBase<NFloat>.
TryConvertToTruncating
<TOther>(NFloat value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
1200
static bool INumberBase<sbyte>.
TryConvertToTruncating
<TOther>(sbyte value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1393
static bool INumberBase<float>.
TryConvertToTruncating
<TOther>(float value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1925
static bool INumberBase<UInt128>.
TryConvertToTruncating
<TOther>(UInt128 value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
1053
static bool INumberBase<ushort>.
TryConvertToTruncating
<TOther>(ushort value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
1098
static bool INumberBase<uint>.
TryConvertToTruncating
<TOther>(uint value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
1091
static bool INumberBase<ulong>.
TryConvertToTruncating
<TOther>(ulong value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
1094
static bool INumberBase<nuint>.
TryConvertToTruncating
<TOther>(nuint value, [MaybeNullWhen(false)] out TOther result)
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
4851
static bool INumberBase<BigInteger>.
TryConvertToTruncating
<TOther>(BigInteger value, [MaybeNullWhen(false)] out TOther result)
System\Numerics\Complex.cs (1)
1955
static 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)
610
else 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)
1362
else 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)
1094
else 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)
1808
else 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)
724
else 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)
765
else 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)
762
else 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)
757
else 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)
117
else if (!TSelf.TryConvertFromTruncating(value, out result) && !TOther.
TryConvertToTruncating
<TSelf>(value, out result))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1342
else 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)
687
else 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)
1091
else 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)
629
else 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)
668
else 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)
667
else 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)
670
else 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)
4044
else 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)
989
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToTruncating
(value, out result))
1953
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToTruncating
{TOther}(TSelf, out TOther)" />