IBinaryNumber<TSelf> 介面

定義

定義以 base-2 格式表示的數位。

generic <typename TSelf>
 where TSelf : IBinaryNumber<TSelf>public interface class IBinaryNumber : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IBitwiseOperators<TSelf, TSelf, TSelf>, System::Numerics::IComparisonOperators<TSelf, TSelf, bool>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IModulusOperators<TSelf, TSelf, TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::INumber<TSelf>, System::Numerics::INumberBase<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
generic <typename TSelf>
 where TSelf : IBinaryNumber<TSelf>public interface class IBinaryNumber : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IBitwiseOperators<TSelf, TSelf, TSelf>, System::Numerics::IComparisonOperators<TSelf, TSelf, bool>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IModulusOperators<TSelf, TSelf, TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::INumber<TSelf>, System::Numerics::INumberBase<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
public interface IBinaryNumber<TSelf> : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IBitwiseOperators<TSelf,TSelf,TSelf>, System.Numerics.IComparisonOperators<TSelf,TSelf,bool>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IModulusOperators<TSelf,TSelf,TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.INumber<TSelf>, System.Numerics.INumberBase<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : IBinaryNumber<TSelf>
public interface IBinaryNumber<TSelf> : IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IBitwiseOperators<TSelf,TSelf,TSelf>, System.Numerics.IComparisonOperators<TSelf,TSelf,bool>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IModulusOperators<TSelf,TSelf,TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.INumber<TSelf>, System.Numerics.INumberBase<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : IBinaryNumber<TSelf>
type IBinaryNumber<'Self (requires 'Self :> IBinaryNumber<'Self>)> = interface
    interface IComparable
    interface IComparable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IEquatable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IFormattable
    interface IParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface ISpanFormattable
    interface ISpanParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IBitwiseOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IDecrementOperators<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IIncrementOperators<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface INumber<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface INumberBase<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
type IBinaryNumber<'Self (requires 'Self :> IBinaryNumber<'Self>)> = interface
    interface IComparable
    interface IComparable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IEquatable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IFormattable
    interface IParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface ISpanFormattable
    interface ISpanParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IBitwiseOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IDecrementOperators<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IIncrementOperators<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface INumber<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface INumberBase<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
type IBinaryNumber<'Self (requires 'Self :> IBinaryNumber<'Self>)> = interface
    interface IComparable
    interface IComparable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IEquatable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IFormattable
    interface IParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface ISpanFormattable
    interface ISpanParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IBitwiseOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IDecrementOperators<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IIncrementOperators<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface INumber<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface INumberBase<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<'Self (requires 'Self :> IBinaryNumber<'Self>)>
    interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
    interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> IBinaryNumber<'Self> and 'Self :> IBinaryNumber<'Self>)>
Public Interface IBinaryNumber(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IBitwiseOperators(Of TSelf, TSelf, TSelf), IComparable(Of TSelf), IComparisonOperators(Of TSelf, TSelf, Boolean), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IModulusOperators(Of TSelf, TSelf, TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), INumber(Of TSelf), INumberBase(Of TSelf), IParsable(Of TSelf), ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf)
Public Interface IBinaryNumber(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IBitwiseOperators(Of TSelf, TSelf, TSelf), IComparable(Of TSelf), IComparisonOperators(Of TSelf, TSelf, Boolean), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IModulusOperators(Of TSelf, TSelf, TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), INumber(Of TSelf), INumberBase(Of TSelf), IParsable(Of TSelf), ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf), IUtf8SpanParsable(Of TSelf)

類型參數

TSelf

實作 介面的型別。

衍生
實作

屬性

AllBitsSet

取得已設定所有位的二進位型別實例。

方法

CompareTo(Object)

將目前的執行個體與相同類型的另一個物件相比較,並傳回整數,這個整數表示目前的執行個體在排序次序中,位於另一個物件之前、之後或相同位置。

(繼承來源 IComparable)
CompareTo(T)

將目前的執行個體與相同類型的另一個物件相比較,並傳回整數,這個整數表示目前的執行個體在排序次序中,位於另一個物件之前、之後或相同位置。

(繼承來源 IComparable<T>)
Equals(T)

指出目前的物件是否等於另一個相同類型的物件。

(繼承來源 IEquatable<T>)
IsPow2(TSelf)

判斷值是否為 2 的乘冪。

Log2(TSelf)

計算值的 log2。

ToString(String, IFormatProvider)

使用指定的格式,格式化目前執行個體的值。

(繼承來源 IFormattable)
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider)

嘗試將目前實例的值格式化為 UTF-8 到提供的位元組範圍。

(繼承來源 IUtf8SpanFormattable)
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

嘗試將目前實例的值格式化為提供的字元範圍。

(繼承來源 ISpanFormattable)

明確介面實作

IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider)

定義以 base-2 格式表示的數位。

(繼承來源 INumberBase<TSelf>)
IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider)

將 UTF-8 字元的範圍剖析為值。

(繼承來源 INumberBase<TSelf>)
IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf)

嘗試將 UTF-8 字元的範圍剖析為值。

(繼承來源 INumberBase<TSelf>)

適用於