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)

Считывает номер дополнения двух из заданного массива в формате big-endian и преобразует его в экземпляр текущего типа.

ReadBigEndian(Byte[], Int32, Boolean)

Считывает номер дополнения двух из заданного массива в формате big-endian и преобразует его в экземпляр текущего типа.

ReadBigEndian(ReadOnlySpan<Byte>, Boolean)

Считывает номер дополнения из заданного диапазона в формате big-endian и преобразует его в экземпляр текущего типа.

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)

Пытается считывать номер дополнения двух из диапазона в формате big-endian и преобразовать его в экземпляр текущего типа.

TryReadLittleEndian(ReadOnlySpan<Byte>, Boolean, TSelf)

Пытается считывать номер дополнения к двум из диапазона в малоиндийном формате и преобразовать его в экземпляр текущего типа.

TryWriteBigEndian(Span<Byte>, Int32)

Пытается записать текущее значение в формате big-endian в заданный диапазон.

TryWriteLittleEndian(Span<Byte>, Int32)

Пытается записать текущее значение в малобайтовом формате в заданный диапазон.

WriteBigEndian(Byte[])

Записывает текущее значение в формате big-endian в заданный массив.

WriteBigEndian(Byte[], Int32)

Записывает текущее значение в формате big-endian в заданный массив.

WriteBigEndian(Span<Byte>)

Записывает текущее значение в формате big-endian в заданный диапазон.

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

Применяется к