20 implementations of TryConvertToSaturating
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
960
static bool INumberBase<byte>.
TryConvertToSaturating
<TOther>(byte value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1773
static bool INumberBase<char>.
TryConvertToSaturating
<TOther>(char value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1714
static bool INumberBase<decimal>.
TryConvertToSaturating
<TOther>(decimal value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1367
static bool INumberBase<double>.
TryConvertToSaturating
<TOther>(double value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
2069
static bool INumberBase<Half>.
TryConvertToSaturating
<TOther>(Half value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1787
static bool INumberBase<Int128>.
TryConvertToSaturating
<TOther>(Int128 value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
1168
static bool INumberBase<short>.
TryConvertToSaturating
<TOther>(short value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
1208
static bool INumberBase<int>.
TryConvertToSaturating
<TOther>(int value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
1203
static bool INumberBase<long>.
TryConvertToSaturating
<TOther>(long value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
1199
static bool INumberBase<nint>.
TryConvertToSaturating
<TOther>(nint value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1641
static bool INumberBase<NFloat>.
TryConvertToSaturating
<TOther>(NFloat value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
1132
static bool INumberBase<sbyte>.
TryConvertToSaturating
<TOther>(sbyte value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1386
static bool INumberBase<float>.
TryConvertToSaturating
<TOther>(float value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1845
static bool INumberBase<UInt128>.
TryConvertToSaturating
<TOther>(UInt128 value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
979
static bool INumberBase<ushort>.
TryConvertToSaturating
<TOther>(ushort value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
1018
static bool INumberBase<uint>.
TryConvertToSaturating
<TOther>(uint value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
1017
static bool INumberBase<ulong>.
TryConvertToSaturating
<TOther>(ulong value, [MaybeNullWhen(false)] out TOther result)
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
1020
static bool INumberBase<nuint>.
TryConvertToSaturating
<TOther>(nuint value, [MaybeNullWhen(false)] out TOther result)
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
4658
static bool INumberBase<BigInteger>.
TryConvertToSaturating
<TOther>(BigInteger value, [MaybeNullWhen(false)] out TOther result)
System\Numerics\Complex.cs (1)
1811
static bool INumberBase<Complex>.
TryConvertToSaturating
<TOther>(Complex value, [MaybeNullWhen(false)] out TOther result)
38 references to TryConvertToSaturating
System.Private.CoreLib (34)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (2)
591
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
958
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1771
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1343
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1712
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Double.cs (2)
1075
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1365
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Half.cs (2)
1789
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
2067
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1785
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int16.cs (2)
705
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1166
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int32.cs (2)
746
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1206
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int64.cs (2)
743
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1201
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (2)
738
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1197
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (1)
92
else if (!TSelf.TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
<TSelf>(value, out result))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1323
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1639
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\SByte.cs (2)
668
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1130
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\Single.cs (2)
1072
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1384
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1843
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (2)
610
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
977
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
649
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1016
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
648
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1015
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
651
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1018
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
System.Runtime.Numerics (4)
System\Numerics\BigInteger.cs (2)
4025
else if (!TryConvertFromSaturating(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
4656
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />
System\Numerics\Complex.cs (2)
970
else if (!TryConvertFrom(value, out result) && !TOther.
TryConvertToSaturating
(value, out result))
1809
/// <inheritdoc cref="INumberBase{TSelf}.
TryConvertToSaturating
{TOther}(TSelf, out TOther)" />