INumberBase<TSelf> Interface
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Define a base de outros tipos de números.
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)
Parâmetros de Tipo Genérico
- TSelf
O tipo que implementa a interface.
- Derivado
- Implementações
-
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>
Propriedades
| Name | Description |
|---|---|
| One |
Obtém o valor |
| Radix |
Obtém a raiz, ou base, para o tipo. |
| Zero |
Obtém o valor |
Métodos
| Name | Description |
|---|---|
| Abs(TSelf) |
Calcula o absoluto de um valor. |
| CreateChecked<TOther>(TOther) |
Cria uma instância do tipo atual a partir de um valor, lançando uma exceção de overflow para quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| CreateSaturating<TOther>(TOther) |
Cria uma instância do tipo atual a partir de um valor, saturando quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| CreateTruncating<TOther>(TOther) |
Cria uma instância do tipo atual a partir de um valor, truncando quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| Equals(T) |
Indica se o objeto atual é igual a outro objeto do mesmo tipo. (Herdado de IEquatable<T>) |
| IsCanonical(TSelf) |
Determina se um valor está na sua representação canónica. |
| IsComplexNumber(TSelf) |
Determina se um valor representa um número complexo. |
| IsEvenInteger(TSelf) |
Determina se um valor representa um número inteiro par. |
| IsFinite(TSelf) |
Determina se um valor é finito. |
| IsImaginaryNumber(TSelf) |
Determina se um valor representa um número puramente imaginário. |
| IsInfinity(TSelf) |
Determina se um valor é infinito. |
| IsInteger(TSelf) |
Determina se um valor representa um número inteiro. |
| IsNaN(TSelf) |
Determina se um valor é NaN. |
| IsNegative(TSelf) |
Determina se um valor representa um número real negativo. |
| IsNegativeInfinity(TSelf) |
Determina se um valor é menos infinito. |
| IsNormal(TSelf) |
Determina se um valor é normal. |
| IsOddInteger(TSelf) |
Determina se um valor representa um número inteiro ímpar. |
| IsPositive(TSelf) |
Determina se um valor representa zero ou um número real positivo. |
| IsPositiveInfinity(TSelf) |
Determina se um valor é infinito positivo. |
| IsRealNumber(TSelf) |
Determina se um valor representa um número real. |
| IsSubnormal(TSelf) |
Determina se um valor é subnormal. |
| IsZero(TSelf) |
Determina se um valor é zero. |
| MaxMagnitude(TSelf, TSelf) |
Compara dois valores para calcular qual tem a maior magnitude. |
| MaxMagnitudeNumber(TSelf, TSelf) |
Compara dois valores para calcular qual tem maior magnitude e devolve o outro valor se uma entrada for |
| MinMagnitude(TSelf, TSelf) |
Compara dois valores para calcular qual tem a magnitude menor. |
| MinMagnitudeNumber(TSelf, TSelf) |
Compara dois valores para calcular que tem a magnitude menor e devolve o outro valor se uma entrada for |
| MultiplyAddEstimate(TSelf, TSelf, TSelf) |
Calcula uma estimativa de ( |
| Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider) |
Analisa um intervalo de caracteres UTF-8 num valor. |
| Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Divide um intervalo de caracteres num valor. |
| Parse(String, NumberStyles, IFormatProvider) |
Transforma uma cadeia num valor. |
| ToString(String, IFormatProvider) |
Formata o valor da instância atual usando o formato especificado. (Herdado de IFormattable) |
| TryConvertFromChecked<TOther>(TOther, TSelf) |
Tenta converter um valor para uma instância do tipo atual, lançando uma exceção de overflow para quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| TryConvertFromSaturating<TOther>(TOther, TSelf) |
Tenta converter um valor para uma instância do tipo atual, saturando quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| TryConvertFromTruncating<TOther>(TOther, TSelf) |
Tenta converter um valor para uma instância do tipo atual, truncando quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| TryConvertToChecked<TOther>(TSelf, TOther) |
Tenta converter uma instância do tipo atual para outro tipo, lançando uma exceção de overflow para quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| TryConvertToSaturating<TOther>(TSelf, TOther) |
Tenta converter uma instância do tipo atual para outro tipo, saturando quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| TryConvertToTruncating<TOther>(TSelf, TOther) |
Tenta converter uma instância do tipo atual para outro tipo, truncando quaisquer valores que estejam fora do intervalo representável do tipo atual. |
| TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Tenta formatar o valor da instância atual como UTF-8 no intervalo fornecido de bytes. (Herdado de IUtf8SpanFormattable) |
| TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Tenta formatar o valor da instância atual no intervalo fornecido de caracteres. (Herdado de ISpanFormattable) |
| TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, TSelf) |
Tenta separar um intervalo de caracteres UTF-8 num valor. |
| TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, TSelf) |
Tenta separar um intervalo de caracteres num valor. |
| TryParse(String, NumberStyles, IFormatProvider, TSelf) |
Tenta analisar uma cadeia num valor. |
Implementações de Interface Explícita
| Name | Description |
|---|---|
| IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Tenta formatar o valor da instância atual como UTF-8 no intervalo fornecido de bytes. |
| IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider) |
Analisa um intervalo de caracteres UTF-8 num valor. |
| IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf) |
Tenta separar um intervalo de caracteres UTF-8 num valor. |