INumber<TSelf> Rozhraní
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Definuje typ čísla.
generic <typename TSelf>
where TSelf : INumber<TSelf>public interface class INumber : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<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::INumberBase<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
generic <typename TSelf>
where TSelf : INumber<TSelf>public interface class INumber : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<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::INumberBase<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
public interface INumber<TSelf> : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<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.INumberBase<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumber<TSelf>
public interface INumber<TSelf> : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<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.INumberBase<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumber<TSelf>
type INumber<'Self (requires 'Self :> INumber<'Self>)> = interface
interface IComparable
interface IComparable<'Self (requires 'Self :> INumber<'Self>)>
interface IEquatable<'Self (requires 'Self :> INumber<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface INumberBase<'Self (requires 'Self :> INumber<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
type INumber<'Self (requires 'Self :> INumber<'Self>)> = interface
interface IComparable
interface IComparable<'Self (requires 'Self :> INumber<'Self>)>
interface IEquatable<'Self (requires 'Self :> INumber<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface INumberBase<'Self (requires 'Self :> INumber<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumber<'Self>)>
type INumber<'Self (requires 'Self :> INumber<'Self>)> = interface
interface IComparable
interface IComparable<'Self (requires 'Self :> INumber<'Self>)>
interface IEquatable<'Self (requires 'Self :> INumber<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface INumberBase<'Self (requires 'Self :> INumber<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
Public Interface INumber(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IComparable, 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), INumberBase(Of TSelf), IParsable(Of TSelf), ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf)
Public Interface INumber(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IComparable, 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), 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)
Parametry typu
- TSelf
Typ, který implementuje rozhraní.
- Odvozené
- Implementuje
-
IComparable IComparable<TSelf> IEquatable<TSelf> IFormattable IParsable<TSelf> ISpanFormattable ISpanParsable<TSelf> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<TSelf,TSelf> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<TSelf> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<TSelf> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<TSelf,TSelf,TSelf> INumberBase<TSelf> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<TSelf,TSelf> IUtf8SpanFormattable IUtf8SpanParsable<TSelf>
Metody
Clamp(TSelf, TSelf, TSelf) |
Upne hodnotu na inkluzivní minimální a maximální hodnotu. |
CompareTo(Object) |
Porovná aktuální instanci s jiným objektem stejného typu a vrátí celé číslo udávající, zda aktuální instance předchází, následuje nebo se vyskytuje ve stejné pozici v pořadí řazení jako druhý objekt. (Zděděno od IComparable) |
CompareTo(T) |
Porovná aktuální instanci s jiným objektem stejného typu a vrátí celé číslo udávající, zda aktuální instance předchází, následuje nebo se vyskytuje ve stejné pozici v pořadí řazení jako druhý objekt. (Zděděno od IComparable<T>) |
CopySign(TSelf, TSelf) |
Zkopíruje znaménko hodnoty na znaménko jiné hodnoty. |
Equals(T) |
Určuje, zda je aktuální objekt roven jinému objektu stejného typu. (Zděděno od IEquatable<T>) |
Max(TSelf, TSelf) |
Porovná dvě hodnoty pro výpočet, který je větší. |
MaxNumber(TSelf, TSelf) |
Porovná dvě hodnoty pro výpočet, který je větší a vrátí druhou hodnotu, pokud je |
Min(TSelf, TSelf) |
Porovná dvě hodnoty s výpočtem, který je menší. |
MinNumber(TSelf, TSelf) |
Porovná dvě hodnoty pro výpočet, který je menší a vrátí druhou hodnotu, pokud je |
Sign(TSelf) |
Vypočítá znaménko hodnoty. |
ToString(String, IFormatProvider) |
Formátuje hodnotu aktuální instance pomocí zadaného formátu. (Zděděno od IFormattable) |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Pokusí se naformátovat hodnotu aktuální instance jako UTF-8 do zadaného rozsahu bajtů. (Zděděno od IUtf8SpanFormattable) |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Pokusí se naformátovat hodnotu aktuální instance do zadaného rozsahu znaků. (Zděděno od ISpanFormattable) |
Explicitní implementace rozhraní
IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Definuje typ čísla. (Zděděno od INumberBase<TSelf>) |
IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider) |
Parsuje rozsah znaků UTF-8 na hodnotu. (Zděděno od INumberBase<TSelf>) |
IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf) |
Pokusí se parsovat rozsah znaků UTF-8 na hodnotu. (Zděděno od INumberBase<TSelf>) |
Platí pro
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro