IBinaryInteger<TSelf> 介面

定義

定義以 base-2 格式表示的整數類型。

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

類型參數

TSelf

實作 介面的型別。

衍生
實作

方法

CompareTo(Object)

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

(繼承來源 IComparable)
CompareTo(T)

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

(繼承來源 IComparable<T>)
DivRem(TSelf, TSelf)

計算兩個值的商數和餘數。

Equals(T)

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

(繼承來源 IEquatable<T>)
GetByteCount()

取得將寫入為 的 TryWriteLittleEndian(Span<Byte>, Int32) 位元組數目。

GetShortestBitLength()

取得目前值之最短兩個補數標記法的長度,以位為單位。

LeadingZeroCount(TSelf)

計算值中前置零位的數目。

PopCount(TSelf)

計算值中所設定的位數。

ReadBigEndian(Byte[], Boolean)

從指定陣列讀取兩個補數的數位,其格式為大到小,並將它轉換成目前類型的實例。

ReadBigEndian(Byte[], Int32, Boolean)

從指定陣列讀取兩個補數的數位,其格式為大到小,並將它轉換成目前類型的實例。

ReadBigEndian(ReadOnlySpan<Byte>, Boolean)

從指定範圍讀取兩個補數的數位,其格式為大到小,並將它轉換成目前類型的實例。

ReadLittleEndian(Byte[], Boolean)

從指定的陣列讀取兩個補數編號,其格式為小到小,並將它轉換成目前類型的實例。

ReadLittleEndian(Byte[], Int32, Boolean)

從指定的陣列讀取兩個補數編號,其格式為小到小,並將它轉換成目前類型的實例。

ReadLittleEndian(ReadOnlySpan<Byte>, Boolean)

以小到尾格式從指定範圍讀取兩個補數編號,並將它轉換成目前類型的實例。

RotateLeft(TSelf, Int32)

將值向左旋轉指定的數量。

RotateRight(TSelf, Int32)

以指定的數量向右旋轉值。

ToString(String, IFormatProvider)

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

(繼承來源 IFormattable)
TrailingZeroCount(TSelf)

計算值中尾端零位的數目。

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

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

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

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

(繼承來源 ISpanFormattable)
TryReadBigEndian(ReadOnlySpan<Byte>, Boolean, TSelf)

嘗試從範圍讀取兩個補數的數位,格式為大到小,並將它轉換成目前類型的實例。

TryReadLittleEndian(ReadOnlySpan<Byte>, Boolean, TSelf)

嘗試從範圍讀取兩個補數的數位,格式為小到小,並將它轉換成目前類型的實例。

TryWriteBigEndian(Span<Byte>, Int32)

嘗試以大到大到大的格式,將目前的值寫入指定的範圍。

TryWriteLittleEndian(Span<Byte>, Int32)

嘗試以位元組端格式將目前的值寫入指定的範圍。

WriteBigEndian(Byte[])

以大到小的格式將目前值寫入指定的陣列。

WriteBigEndian(Byte[], Int32)

以大到小的格式將目前值寫入指定的陣列。

WriteBigEndian(Span<Byte>)

以大到小的格式,將目前的值寫入指定的範圍。

WriteLittleEndian(Byte[])

以位元組端格式將目前的值寫入指定的陣列。

WriteLittleEndian(Byte[], Int32)

以位元組端格式將目前值寫入指定的陣列,從指定的索引開始。

WriteLittleEndian(Span<Byte>)

以位元組端格式將目前的值寫入指定的範圍。

明確介面實作

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>)

適用於