INumber<TSelf> Interfaz
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Define un tipo de número.
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)
Parámetros de tipo
- TSelf
Tipo que implementa la interfaz .
- Derivado
- Implementaciones
-
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>
Métodos
Clamp(TSelf, TSelf, TSelf) |
Sujeta un valor a un valor mínimo inclusivo y máximo. |
CompareTo(Object) |
Compara la instancia actual con otro objeto del mismo tipo y devuelve un entero que indica si la posición de la instancia actual es anterior, posterior o igual que la del otro objeto en el criterio de ordenación. (Heredado de IComparable) |
CompareTo(T) |
Compara la instancia actual con otro objeto del mismo tipo y devuelve un entero que indica si la posición de la instancia actual es anterior, posterior o igual que la del otro objeto en el criterio de ordenación. (Heredado de IComparable<T>) |
CopySign(TSelf, TSelf) |
Copia el signo de un valor en el signo de otro valor. |
Equals(T) |
Indica si el objeto actual es igual que otro objeto del mismo tipo. (Heredado de IEquatable<T>) |
Max(TSelf, TSelf) |
Compara dos valores con el proceso, que es mayor. |
MaxNumber(TSelf, TSelf) |
Compara dos valores con el proceso, que es mayor y devuelve el otro valor si una entrada es |
Min(TSelf, TSelf) |
Compara dos valores con el proceso, que es menor. |
MinNumber(TSelf, TSelf) |
Compara dos valores con el proceso, que es menor y devuelve el otro valor si una entrada es |
Sign(TSelf) |
Calcula el signo de un valor. |
ToString(String, IFormatProvider) |
Da formato al valor de la instancia actual usando el formato especificado. (Heredado de IFormattable) |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Intenta dar formato al valor de la instancia actual como UTF-8 en el intervalo de bytes proporcionado. (Heredado de IUtf8SpanFormattable) |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Intenta dar formato al valor de la instancia actual en el intervalo de caracteres proporcionado. (Heredado de ISpanFormattable) |
Implementaciones de interfaz explícitas
IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Define un tipo de número. (Heredado de INumberBase<TSelf>) |
IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider) |
Analiza un intervalo de caracteres UTF-8 en un valor. (Heredado de INumberBase<TSelf>) |
IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf) |
Intenta analizar un intervalo de caracteres UTF-8 en un valor. (Heredado de INumberBase<TSelf>) |
Se aplica a
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente las Cuestiones de GitHub como mecanismo de retroalimentación para el contenido y lo sustituiremos por un nuevo sistema de retroalimentación. Para más información, consulta:Enviar y ver comentarios de