INumberBase<TSelf> Gränssnitt
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Definierar basen för andra nummertyper.
generic <typename TSelf>
where TSelf : INumberBase<TSelf>public interface class INumberBase : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, IUtf8SpanFormattable, IUtf8SpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
generic <typename TSelf>
where TSelf : INumberBase<TSelf>public interface class INumberBase : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
public interface INumberBase<TSelf> : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, IUtf8SpanFormattable, IUtf8SpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumberBase<TSelf>
public interface INumberBase<TSelf> : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumberBase<TSelf>
type INumberBase<'Self (requires 'Self :> INumberBase<'Self>)> = interface
interface IEquatable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
type INumberBase<'Self (requires 'Self :> INumberBase<'Self>)> = interface
interface IEquatable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
type INumberBase<'Self (requires 'Self :> INumberBase<'Self>)> = interface
interface IEquatable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
Public Interface INumberBase(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), IParsable(Of TSelf), ISpanFormattable, ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf), IUtf8SpanFormattable, IUtf8SpanParsable(Of TSelf)
Public Interface INumberBase(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), IParsable(Of TSelf), ISpanFormattable, ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf)
Typparametrar
- TSelf
Den typ som implementerar gränssnittet.
- Härledda
- Implementeringar
-
IEquatable<TSelf> IFormattable IParsable<TSelf> ISpanFormattable ISpanParsable<TSelf> IUtf8SpanFormattable IUtf8SpanParsable<TSelf> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<TSelf,TSelf> IDecrementOperators<TSelf> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<TSelf> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<TSelf,TSelf,TSelf> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<TSelf,TSelf>
Egenskaper
| Name | Description |
|---|---|
| One |
Hämtar värdet |
| Radix |
Hämtar radixet, eller basen, för typen. |
| Zero |
Hämtar värdet |
Metoder
| Name | Description |
|---|---|
| Abs(TSelf) |
Beräknar det absoluta värdet. |
| CreateChecked<TOther>(TOther) |
Skapar en instans av den aktuella typen från ett värde, vilket utlöser ett spill-undantag för värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| CreateSaturating<TOther>(TOther) |
Skapar en instans av den aktuella typen från ett värde som mättar alla värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| CreateTruncating<TOther>(TOther) |
Skapar en instans av den aktuella typen från ett värde och trunkerar alla värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| Equals(T) |
Anger om det aktuella objektet är lika med ett annat objekt av samma typ. (Ärvd från IEquatable<T>) |
| IsCanonical(TSelf) |
Avgör om ett värde finns i dess kanoniska representation. |
| IsComplexNumber(TSelf) |
Avgör om ett värde representerar ett komplext tal. |
| IsEvenInteger(TSelf) |
Avgör om ett värde representerar ett jämnt heltal. |
| IsFinite(TSelf) |
Avgör om ett värde är begränsat. |
| IsImaginaryNumber(TSelf) |
Avgör om ett värde representerar ett rent imaginärt tal. |
| IsInfinity(TSelf) |
Avgör om ett värde är oändligt. |
| IsInteger(TSelf) |
Avgör om ett värde representerar ett heltal. |
| IsNaN(TSelf) |
Avgör om ett värde är NaN. |
| IsNegative(TSelf) |
Avgör om ett värde representerar ett negativt reellt tal. |
| IsNegativeInfinity(TSelf) |
Avgör om ett värde är negativ oändlighet. |
| IsNormal(TSelf) |
Avgör om ett värde är normalt. |
| IsOddInteger(TSelf) |
Avgör om ett värde representerar ett udda integraltal. |
| IsPositive(TSelf) |
Avgör om ett värde representerar noll eller ett positivt reellt tal. |
| IsPositiveInfinity(TSelf) |
Avgör om ett värde är positiv oändlighet. |
| IsRealNumber(TSelf) |
Avgör om ett värde representerar ett verkligt tal. |
| IsSubnormal(TSelf) |
Avgör om ett värde är subnormalt. |
| IsZero(TSelf) |
Avgör om ett värde är noll. |
| MaxMagnitude(TSelf, TSelf) |
Jämför två värden med beräkning som har större storlek. |
| MaxMagnitudeNumber(TSelf, TSelf) |
Jämför två värden med beräkning som har större storlek och returnerar det andra värdet om en indata är |
| MinMagnitude(TSelf, TSelf) |
Jämför två värden med beräkning som har den mindre storleken. |
| MinMagnitudeNumber(TSelf, TSelf) |
Jämför två värden med beräkning som har mindre storlek och returnerar det andra värdet om en indata är |
| MultiplyAddEstimate(TSelf, TSelf, TSelf) |
Beräknar en uppskattning av ( |
| Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider) |
Parsar ett intervall med UTF-8 tecken till ett värde. |
| Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Parsar ett teckenintervall till ett värde. |
| Parse(String, NumberStyles, IFormatProvider) |
Parsar en sträng till ett värde. |
| ToString(String, IFormatProvider) |
Formaterar värdet för den aktuella instansen med det angivna formatet. (Ärvd från IFormattable) |
| TryConvertFromChecked<TOther>(TOther, TSelf) |
Försöker konvertera ett värde till en instans av den aktuella typen, vilket utlöser ett spill-undantag för värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| TryConvertFromSaturating<TOther>(TOther, TSelf) |
Försöker konvertera ett värde till en instans av den aktuella typen, vilket mättar alla värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| TryConvertFromTruncating<TOther>(TOther, TSelf) |
Försöker konvertera ett värde till en instans av den aktuella typen, och trunkerar alla värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| TryConvertToChecked<TOther>(TSelf, TOther) |
Försöker konvertera en instans av den aktuella typen till en annan typ, vilket utlöser ett spill-undantag för värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| TryConvertToSaturating<TOther>(TSelf, TOther) |
Försöker konvertera en instans av den aktuella typen till en annan typ, vilket mättar alla värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| TryConvertToTruncating<TOther>(TSelf, TOther) |
Försöker konvertera en instans av den aktuella typen till en annan typ och trunkerar alla värden som ligger utanför det representerarbara intervallet för den aktuella typen. |
| TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Försöker formatera värdet för den aktuella instansen som UTF-8 i det angivna byteintervallet. (Ärvd från IUtf8SpanFormattable) |
| TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Försöker formatera värdet för den aktuella instansen till det angivna intervallet med tecken. (Ärvd från ISpanFormattable) |
| TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, TSelf) |
Försöker parsa ett intervall med UTF-8 tecken till ett värde. |
| TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, TSelf) |
Försöker parsa ett teckenintervall till ett värde. |
| TryParse(String, NumberStyles, IFormatProvider, TSelf) |
Försöker parsa en sträng till ett värde. |
Explicita gränssnittsimplementeringar
| Name | Description |
|---|---|
| IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Försöker formatera värdet för den aktuella instansen som UTF-8 i det angivna byteintervallet. |
| IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider) |
Parsar ett intervall med UTF-8 tecken till ett värde. |
| IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf) |
Försöker parsa ett intervall med UTF-8 tecken till ett värde. |