INumberBase<TSelf> Interfejs
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Definiuje bazę innych typów liczb.
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>
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>
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>
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>
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>)>
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>)>
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)
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)
Parametry typu
- TSelf
Typ implementujący interfejs.
- Pochodne
- Implementuje
-
IEquatable<TSelf> IFormattable IParsable<TSelf> ISpanFormattable ISpanParsable<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> IUtf8SpanFormattable IUtf8SpanParsable<TSelf>
Właściwości
One |
Pobiera wartość |
Radix |
Pobiera promienie lub podstawę dla typu. |
Zero |
Pobiera wartość |
Metody
Abs(TSelf) |
Oblicza wartość bezwzględną. |
CreateChecked<TOther>(TOther) |
Tworzy wystąpienie bieżącego typu z wartości, zgłaszając wyjątek przepełnienia dla wszystkich wartości, które wykraczają poza reprezentatywny zakres bieżącego typu. |
CreateSaturating<TOther>(TOther) |
Tworzy wystąpienie bieżącego typu z wartości, saturując wszystkie wartości, które mieszczą się poza reprezentatywnym zakresem bieżącego typu. |
CreateTruncating<TOther>(TOther) |
Tworzy wystąpienie bieżącego typu z wartości, obcinając wszystkie wartości, które wykraczają poza reprezentatywny zakres bieżącego typu. |
Equals(T) |
Wskazuje, czy bieżący obiekt jest równy innemu obiektowi tego samego typu. (Odziedziczone po IEquatable<T>) |
IsCanonical(TSelf) |
Określa, czy wartość znajduje się w swojej reprezentacji kanonicznej. |
IsComplexNumber(TSelf) |
Określa, czy wartość reprezentuje liczbę zespolonej. |
IsEvenInteger(TSelf) |
Określa, czy wartość reprezentuje parzystą liczbę całkowitą. |
IsFinite(TSelf) |
Określa, czy wartość jest skończona. |
IsImaginaryNumber(TSelf) |
Określa, czy wartość reprezentuje czystą wyimaginowaną liczbę. |
IsInfinity(TSelf) |
Określa, czy wartość jest nieskończona. |
IsInteger(TSelf) |
Określa, czy wartość reprezentuje liczbę całkowitą. |
IsNaN(TSelf) |
Określa, czy wartość to NaN. |
IsNegative(TSelf) |
Określa, czy wartość reprezentuje ujemną liczbę rzeczywistą. |
IsNegativeInfinity(TSelf) |
Określa, czy wartość jest ujemną nieskończonością. |
IsNormal(TSelf) |
Określa, czy wartość jest normalna. |
IsOddInteger(TSelf) |
Określa, czy wartość reprezentuje nieparzystą liczbę całkowitą. |
IsPositive(TSelf) |
Określa, czy wartość reprezentuje zero lub dodatnią liczbę rzeczywistą. |
IsPositiveInfinity(TSelf) |
Określa, czy wartość jest dodatnią nieskończonością. |
IsRealNumber(TSelf) |
Określa, czy wartość reprezentuje liczbę rzeczywistą. |
IsSubnormal(TSelf) |
Określa, czy wartość jest podnormalna. |
IsZero(TSelf) |
Określa, czy wartość ma wartość zero. |
MaxMagnitude(TSelf, TSelf) |
Porównuje dwie wartości do obliczeń o większej wielkości. |
MaxMagnitudeNumber(TSelf, TSelf) |
Porównuje dwie wartości do obliczeń o większej wielkości i zwraca inną wartość, jeśli dane wejściowe to |
MinMagnitude(TSelf, TSelf) |
Porównuje dwie wartości z obliczeniami o mniejszej wielkości. |
MinMagnitudeNumber(TSelf, TSelf) |
Porównuje dwie wartości do obliczeń o mniejszej wielkości i zwraca inną wartość, jeśli dane wejściowe to |
MultiplyAddEstimate(TSelf, TSelf, TSelf) |
Definiuje bazę innych typów liczb. |
Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider) |
Analizuje zakres znaków UTF-8 w wartość. |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Analizuje zakres znaków w wartości. |
Parse(String, NumberStyles, IFormatProvider) |
Analizuje ciąg w wartość. |
ToString(String, IFormatProvider) |
Formatuje wartość bieżącego wystąpienia przy użyciu określonego formatu. (Odziedziczone po IFormattable) |
TryConvertFromChecked<TOther>(TOther, TSelf) |
Próbuje przekonwertować wartość na wystąpienie bieżącego typu, zgłaszając wyjątek przepełnienia dla wszystkich wartości, które wykraczają poza reprezentatywny zakres bieżącego typu. |
TryConvertFromSaturating<TOther>(TOther, TSelf) |
Próbuje przekonwertować wartość na wystąpienie bieżącego typu, saturując wszystkie wartości, które mieszczą się poza reprezentatywnym zakresem bieżącego typu. |
TryConvertFromTruncating<TOther>(TOther, TSelf) |
Próbuje przekonwertować wartość na wystąpienie bieżącego typu, obcinając wszystkie wartości, które wykraczają poza reprezentatywny zakres bieżącego typu. |
TryConvertToChecked<TOther>(TSelf, TOther) |
Próbuje przekonwertować wystąpienie bieżącego typu na inny typ, zgłaszając wyjątek przepełnienia dla wszystkich wartości, które wykraczają poza reprezentatywny zakres bieżącego typu. |
TryConvertToSaturating<TOther>(TSelf, TOther) |
Próbuje przekonwertować wystąpienie bieżącego typu na inny typ, saturując wszystkie wartości, które mieszczą się poza reprezentatywnym zakresem bieżącego typu. |
TryConvertToTruncating<TOther>(TSelf, TOther) |
Próbuje przekonwertować wystąpienie bieżącego typu na inny typ, obcinając wszystkie wartości, które mieszczą się poza reprezentatywnym zakresem bieżącego typu. |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Próbuje sformatować wartość bieżącego wystąpienia jako UTF-8 w podanym zakresie bajtów. (Odziedziczone po IUtf8SpanFormattable) |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Próbuje sformatować wartość bieżącego wystąpienia w podanym zakresie znaków. (Odziedziczone po ISpanFormattable) |
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, TSelf) |
Próbuje przeanalizować zakres znaków UTF-8 w wartość. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, TSelf) |
Próbuje przeanalizować zakres znaków w wartości. |
TryParse(String, NumberStyles, IFormatProvider, TSelf) |
Próbuje przeanalizować ciąg w wartość. |
Jawne implementacje interfejsu
IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Definiuje bazę innych typów liczb. |
IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider) |
Analizuje zakres znaków UTF-8 w wartość. |
IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf) |
Próbuje przeanalizować zakres znaków UTF-8 w wartość. |
Dotyczy
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla