20 implementations of IsZero
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
667static bool INumberBase<byte>.IsZero(byte value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1488static bool INumberBase<char>.IsZero(char value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1447static bool INumberBase<decimal>.IsZero(decimal value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1135static bool INumberBase<double>.IsZero(double value) => IsZero(value);
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1849static bool INumberBase<Half>.IsZero(Half value) => IsZero(value);
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1404static bool INumberBase<Int128>.IsZero(Int128 value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
781static bool INumberBase<short>.IsZero(short value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
822static bool INumberBase<int>.IsZero(int value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
819static bool INumberBase<long>.IsZero(long value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
814static bool INumberBase<nint>.IsZero(nint value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1375static bool INumberBase<NFloat>.IsZero(NFloat value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
744static bool INumberBase<sbyte>.IsZero(sbyte value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1152static bool INumberBase<float>.IsZero(float value) => IsZero(value);
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1554static bool INumberBase<UInt128>.IsZero(UInt128 value) => (value == 0U);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
686static bool INumberBase<ushort>.IsZero(ushort value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
725static bool INumberBase<uint>.IsZero(uint value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
724static bool INumberBase<ulong>.IsZero(ulong value) => (value == 0);
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
727static bool INumberBase<nuint>.IsZero(nuint value) => (value == 0);
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
4127static bool INumberBase<BigInteger>.IsZero(BigInteger value)
System\Numerics\Complex.cs (1)
1074static bool INumberBase<Complex>.IsZero(Complex value) => (value.m_real == 0.0) && (value.m_imaginary == 0.0);
30 references to IsZero
PresentationCore.Tests (2)
FluentAssertions\ComparisonHelpers.cs (2)
108static unsafe bool IsNegativeZero(T value) => T.IsZero(value) && T.IsNegative(value); 110static unsafe bool IsPositiveZero(T value) => T.IsZero(value) && T.IsPositive(value);
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\TensorPrimitives.IsZero.cs (1)
52public static bool Invoke(T x) => T.IsZero(x);
System.Private.CoreLib (21)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (2)
132if (T.IsZero(value)) 152if (T.IsNegative(value) || T.IsZero(value))
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
666/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1487/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1446/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1134/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1848/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1403/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
780/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
821/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
818/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
813/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Numerics\TotalOrderIeee754Comparer.cs (1)
112if (T.IsZero(x)) // only zeros are equal to zeros
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1374/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
743/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1151/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1553/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
685/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
724/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
723/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
726/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
System.Private.Windows.Core.TestUtilities (2)
ComparisonHelpers.cs (2)
108static unsafe bool IsNegativeZero(T value) => T.IsZero(value) && T.IsNegative(value); 110static unsafe bool IsPositiveZero(T value) => T.IsZero(value) && T.IsPositive(value);
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
4126/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
System\Numerics\Complex.cs (1)
1073/// <inheritdoc cref="INumberBase{TSelf}.IsZero(TSelf)" />
System.Windows.Forms.Primitives.TestUtilities (2)
Extensions\AssertExtensions.cs (2)
618=> T.IsZero(value) && T.IsNegative(value); 622=> T.IsZero(value) && T.IsPositive(value);