Compartir a través de


UInt16 Estructura

Definición

Importante

Esta API no es conforme a CLS.

Representa un entero de 16 bits sin signo.

public value class System::UInt16 : IComparable, IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, IFormattable
public value class System::UInt16 : IComparable, IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, ISpanFormattable
public value class System::UInt16 : IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, IParsable<System::UInt16>, ISpanParsable<System::UInt16>, System::Numerics::IAdditionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IAdditiveIdentity<System::UInt16, System::UInt16>, System::Numerics::IBinaryInteger<System::UInt16>, System::Numerics::IBinaryNumber<System::UInt16>, System::Numerics::IBitwiseOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IComparisonOperators<System::UInt16, System::UInt16, bool>, System::Numerics::IDecrementOperators<System::UInt16>, System::Numerics::IDivisionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IEqualityOperators<System::UInt16, System::UInt16, bool>, System::Numerics::IIncrementOperators<System::UInt16>, System::Numerics::IMinMaxValue<System::UInt16>, System::Numerics::IModulusOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IMultiplicativeIdentity<System::UInt16, System::UInt16>, System::Numerics::IMultiplyOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::INumber<System::UInt16>, System::Numerics::INumberBase<System::UInt16>, System::Numerics::IShiftOperators<System::UInt16, int, System::UInt16>, System::Numerics::ISubtractionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IUnaryNegationOperators<System::UInt16, System::UInt16>, System::Numerics::IUnaryPlusOperators<System::UInt16, System::UInt16>, System::Numerics::IUnsignedNumber<System::UInt16>
public value class System::UInt16 : IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, IParsable<System::UInt16>, ISpanParsable<System::UInt16>, IUtf8SpanParsable<System::UInt16>, System::Numerics::IAdditionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IAdditiveIdentity<System::UInt16, System::UInt16>, System::Numerics::IBinaryInteger<System::UInt16>, System::Numerics::IBinaryNumber<System::UInt16>, System::Numerics::IBitwiseOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IComparisonOperators<System::UInt16, System::UInt16, bool>, System::Numerics::IDecrementOperators<System::UInt16>, System::Numerics::IDivisionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IEqualityOperators<System::UInt16, System::UInt16, bool>, System::Numerics::IIncrementOperators<System::UInt16>, System::Numerics::IMinMaxValue<System::UInt16>, System::Numerics::IModulusOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IMultiplicativeIdentity<System::UInt16, System::UInt16>, System::Numerics::IMultiplyOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::INumber<System::UInt16>, System::Numerics::INumberBase<System::UInt16>, System::Numerics::IShiftOperators<System::UInt16, int, System::UInt16>, System::Numerics::ISubtractionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IUnaryNegationOperators<System::UInt16, System::UInt16>, System::Numerics::IUnaryPlusOperators<System::UInt16, System::UInt16>, System::Numerics::IUnsignedNumber<System::UInt16>
public value class System::UInt16 : IComparable, IConvertible, IFormattable
public value class System::UInt16 : IComparable, IComparable<System::UInt16>, IEquatable<System::UInt16>, IFormattable
[System.CLSCompliant(false)]
public struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, IFormattable
[System.CLSCompliant(false)]
public readonly struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, IFormattable
[System.CLSCompliant(false)]
public readonly struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, ISpanFormattable
[System.CLSCompliant(false)]
public readonly struct UInt16 : IComparable<ushort>, IConvertible, IEquatable<ushort>, IParsable<ushort>, ISpanParsable<ushort>, System.Numerics.IAdditionOperators<ushort,ushort,ushort>, System.Numerics.IAdditiveIdentity<ushort,ushort>, System.Numerics.IBinaryInteger<ushort>, System.Numerics.IBinaryNumber<ushort>, System.Numerics.IBitwiseOperators<ushort,ushort,ushort>, System.Numerics.IComparisonOperators<ushort,ushort,bool>, System.Numerics.IDecrementOperators<ushort>, System.Numerics.IDivisionOperators<ushort,ushort,ushort>, System.Numerics.IEqualityOperators<ushort,ushort,bool>, System.Numerics.IIncrementOperators<ushort>, System.Numerics.IMinMaxValue<ushort>, System.Numerics.IModulusOperators<ushort,ushort,ushort>, System.Numerics.IMultiplicativeIdentity<ushort,ushort>, System.Numerics.IMultiplyOperators<ushort,ushort,ushort>, System.Numerics.INumber<ushort>, System.Numerics.INumberBase<ushort>, System.Numerics.IShiftOperators<ushort,int,ushort>, System.Numerics.ISubtractionOperators<ushort,ushort,ushort>, System.Numerics.IUnaryNegationOperators<ushort,ushort>, System.Numerics.IUnaryPlusOperators<ushort,ushort>, System.Numerics.IUnsignedNumber<ushort>
[System.CLSCompliant(false)]
public readonly struct UInt16 : IComparable<ushort>, IConvertible, IEquatable<ushort>, IParsable<ushort>, ISpanParsable<ushort>, IUtf8SpanParsable<ushort>, System.Numerics.IAdditionOperators<ushort,ushort,ushort>, System.Numerics.IAdditiveIdentity<ushort,ushort>, System.Numerics.IBinaryInteger<ushort>, System.Numerics.IBinaryNumber<ushort>, System.Numerics.IBitwiseOperators<ushort,ushort,ushort>, System.Numerics.IComparisonOperators<ushort,ushort,bool>, System.Numerics.IDecrementOperators<ushort>, System.Numerics.IDivisionOperators<ushort,ushort,ushort>, System.Numerics.IEqualityOperators<ushort,ushort,bool>, System.Numerics.IIncrementOperators<ushort>, System.Numerics.IMinMaxValue<ushort>, System.Numerics.IModulusOperators<ushort,ushort,ushort>, System.Numerics.IMultiplicativeIdentity<ushort,ushort>, System.Numerics.IMultiplyOperators<ushort,ushort,ushort>, System.Numerics.INumber<ushort>, System.Numerics.INumberBase<ushort>, System.Numerics.IShiftOperators<ushort,int,ushort>, System.Numerics.ISubtractionOperators<ushort,ushort,ushort>, System.Numerics.IUnaryNegationOperators<ushort,ushort>, System.Numerics.IUnaryPlusOperators<ushort,ushort>, System.Numerics.IUnsignedNumber<ushort>
[System.CLSCompliant(false)]
[System.Serializable]
public struct UInt16 : IComparable, IConvertible, IFormattable
[System.CLSCompliant(false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, IFormattable
[System.CLSCompliant(false)]
public struct UInt16 : IComparable, IComparable<ushort>, IEquatable<ushort>, IFormattable
[<System.CLSCompliant(false)>]
type uint16 = struct
    interface IConvertible
    interface IFormattable
[<System.CLSCompliant(false)>]
type uint16 = struct
    interface IConvertible
    interface ISpanFormattable
    interface IFormattable
[<System.CLSCompliant(false)>]
type uint16 = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<uint16>
    interface ISpanFormattable
    interface ISpanParsable<uint16>
    interface IAdditionOperators<uint16, uint16, uint16>
    interface IAdditiveIdentity<uint16, uint16>
    interface IBinaryInteger<uint16>
    interface IBinaryNumber<uint16>
    interface IBitwiseOperators<uint16, uint16, uint16>
    interface IComparisonOperators<uint16, uint16, bool>
    interface IEqualityOperators<uint16, uint16, bool>
    interface IDecrementOperators<uint16>
    interface IDivisionOperators<uint16, uint16, uint16>
    interface IIncrementOperators<uint16>
    interface IModulusOperators<uint16, uint16, uint16>
    interface IMultiplicativeIdentity<uint16, uint16>
    interface IMultiplyOperators<uint16, uint16, uint16>
    interface INumber<uint16>
    interface INumberBase<uint16>
    interface ISubtractionOperators<uint16, uint16, uint16>
    interface IUnaryNegationOperators<uint16, uint16>
    interface IUnaryPlusOperators<uint16, uint16>
    interface IShiftOperators<uint16, int, uint16>
    interface IMinMaxValue<uint16>
    interface IUnsignedNumber<uint16>
[<System.CLSCompliant(false)>]
type uint16 = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<uint16>
    interface ISpanFormattable
    interface ISpanParsable<uint16>
    interface IAdditionOperators<uint16, uint16, uint16>
    interface IAdditiveIdentity<uint16, uint16>
    interface IBinaryInteger<uint16>
    interface IBinaryNumber<uint16>
    interface IBitwiseOperators<uint16, uint16, uint16>
    interface IComparisonOperators<uint16, uint16, bool>
    interface IEqualityOperators<uint16, uint16, bool>
    interface IDecrementOperators<uint16>
    interface IDivisionOperators<uint16, uint16, uint16>
    interface IIncrementOperators<uint16>
    interface IModulusOperators<uint16, uint16, uint16>
    interface IMultiplicativeIdentity<uint16, uint16>
    interface IMultiplyOperators<uint16, uint16, uint16>
    interface INumber<uint16>
    interface INumberBase<uint16>
    interface ISubtractionOperators<uint16, uint16, uint16>
    interface IUnaryNegationOperators<uint16, uint16>
    interface IUnaryPlusOperators<uint16, uint16>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<uint16>
    interface IShiftOperators<uint16, int, uint16>
    interface IMinMaxValue<uint16>
    interface IUnsignedNumber<uint16>
[<System.CLSCompliant(false)>]
type uint16 = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<uint16>
    interface ISpanFormattable
    interface ISpanParsable<uint16>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<uint16>
    interface IAdditionOperators<uint16, uint16, uint16>
    interface IAdditiveIdentity<uint16, uint16>
    interface IBinaryInteger<uint16>
    interface IBinaryNumber<uint16>
    interface IBitwiseOperators<uint16, uint16, uint16>
    interface IComparisonOperators<uint16, uint16, bool>
    interface IEqualityOperators<uint16, uint16, bool>
    interface IDecrementOperators<uint16>
    interface IDivisionOperators<uint16, uint16, uint16>
    interface IIncrementOperators<uint16>
    interface IModulusOperators<uint16, uint16, uint16>
    interface IMultiplicativeIdentity<uint16, uint16>
    interface IMultiplyOperators<uint16, uint16, uint16>
    interface INumber<uint16>
    interface INumberBase<uint16>
    interface ISubtractionOperators<uint16, uint16, uint16>
    interface IUnaryNegationOperators<uint16, uint16>
    interface IUnaryPlusOperators<uint16, uint16>
    interface IShiftOperators<uint16, int, uint16>
    interface IMinMaxValue<uint16>
    interface IUnsignedNumber<uint16>
[<System.CLSCompliant(false)>]
[<System.Serializable>]
type uint16 = struct
    interface IFormattable
    interface IConvertible
[<System.CLSCompliant(false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type uint16 = struct
    interface IFormattable
    interface IConvertible
[<System.CLSCompliant(false)>]
type uint16 = struct
    interface IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IConvertible, IEquatable(Of UShort), IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IConvertible, IEquatable(Of UShort), ISpanFormattable
Public Structure UInt16
Implements IAdditionOperators(Of UShort, UShort, UShort), IAdditiveIdentity(Of UShort, UShort), IBinaryInteger(Of UShort), IBinaryNumber(Of UShort), IBitwiseOperators(Of UShort, UShort, UShort), IComparable(Of UShort), IComparisonOperators(Of UShort, UShort, Boolean), IConvertible, IDecrementOperators(Of UShort), IDivisionOperators(Of UShort, UShort, UShort), IEqualityOperators(Of UShort, UShort, Boolean), IEquatable(Of UShort), IIncrementOperators(Of UShort), IMinMaxValue(Of UShort), IModulusOperators(Of UShort, UShort, UShort), IMultiplicativeIdentity(Of UShort, UShort), IMultiplyOperators(Of UShort, UShort, UShort), INumber(Of UShort), INumberBase(Of UShort), IParsable(Of UShort), IShiftOperators(Of UShort, Integer, UShort), ISpanParsable(Of UShort), ISubtractionOperators(Of UShort, UShort, UShort), IUnaryNegationOperators(Of UShort, UShort), IUnaryPlusOperators(Of UShort, UShort), IUnsignedNumber(Of UShort)
Public Structure UInt16
Implements IAdditionOperators(Of UShort, UShort, UShort), IAdditiveIdentity(Of UShort, UShort), IBinaryInteger(Of UShort), IBinaryNumber(Of UShort), IBitwiseOperators(Of UShort, UShort, UShort), IComparable(Of UShort), IComparisonOperators(Of UShort, UShort, Boolean), IConvertible, IDecrementOperators(Of UShort), IDivisionOperators(Of UShort, UShort, UShort), IEqualityOperators(Of UShort, UShort, Boolean), IEquatable(Of UShort), IIncrementOperators(Of UShort), IMinMaxValue(Of UShort), IModulusOperators(Of UShort, UShort, UShort), IMultiplicativeIdentity(Of UShort, UShort), IMultiplyOperators(Of UShort, UShort, UShort), INumber(Of UShort), INumberBase(Of UShort), IParsable(Of UShort), IShiftOperators(Of UShort, Integer, UShort), ISpanParsable(Of UShort), ISubtractionOperators(Of UShort, UShort, UShort), IUnaryNegationOperators(Of UShort, UShort), IUnaryPlusOperators(Of UShort, UShort), IUnsignedNumber(Of UShort), IUtf8SpanParsable(Of UShort)
Public Structure UInt16
Implements IComparable, IConvertible, IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IEquatable(Of UShort), IFormattable
Herencia
UInt16
Atributos
Implementaciones
IComparable IComparable<UInt16> IConvertible IEquatable<UInt16> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<UInt16> IParsable<TSelf> ISpanParsable<UInt16> ISpanParsable<TSelf> IAdditionOperators<UInt16,UInt16,UInt16> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<UInt16,UInt16> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<UInt16> IBinaryNumber<UInt16> IBinaryNumber<TSelf> IBitwiseOperators<UInt16,UInt16,UInt16> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<UInt16,UInt16,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<UInt16> IDecrementOperators<TSelf> IDivisionOperators<UInt16,UInt16,UInt16> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<UInt16,UInt16,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<UInt16> IIncrementOperators<TSelf> IMinMaxValue<UInt16> IModulusOperators<UInt16,UInt16,UInt16> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<UInt16,UInt16> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<UInt16,UInt16,UInt16> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<UInt16> INumber<TSelf> INumberBase<UInt16> INumberBase<TSelf> IShiftOperators<UInt16,Int32,UInt16> IShiftOperators<TSelf,Int32,TSelf> ISubtractionOperators<UInt16,UInt16,UInt16> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<UInt16,UInt16> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<UInt16,UInt16> IUnaryPlusOperators<TSelf,TSelf> IUnsignedNumber<UInt16> IUtf8SpanFormattable IUtf8SpanParsable<UInt16> IUtf8SpanParsable<TSelf>

Comentarios

El tipo de valor UInt16 representa enteros sin signo con valores comprendidos entre 0 y 65535.

Importante

El tipo UInt16 no es compatible con CLS. El tipo alternativo conforme a CLS es Int32. Int16 se puede usar en su lugar para reemplazar un valor de UInt16 que va de cero a Int16.MaxValue. Para obtener más información sobre el cumplimiento de CLS, consulte Language Independence and Language-Independent Components.

La estructura UInt16 proporciona métodos para comparar instancias de este tipo, convertir el valor de una instancia en su representación de cadena y convertir la representación de cadena de un número en una instancia de este tipo.

Para obtener información sobre cómo los códigos de especificación de formato controlan la representación de cadena de los tipos de valor, vea Tipos de formato.

Campos

MaxValue

Representa el valor más grande posible de UInt16. Este campo es constante.

MinValue

Representa el valor más pequeño posible de UInt16. Este campo es constante.

Métodos

Clamp(UInt16, UInt16, UInt16)

Fija un valor en un valor mínimo inclusivo y máximo.

CompareTo(Object)

Compara esta instancia con un objeto especificado y devuelve una indicación de sus valores relativos.

CompareTo(UInt16)

Compara esta instancia con un entero de 16 bits sin signo especificado y devuelve una indicación de sus valores relativos.

CreateChecked<TOther>(TOther)

Crea una instancia del tipo actual a partir de un valor, iniciando una excepción de desbordamiento para los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

CreateSaturating<TOther>(TOther)

Crea una instancia del tipo actual a partir de un valor, saturando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

CreateTruncating<TOther>(TOther)

Crea una instancia del tipo actual a partir de un valor, truncando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

DivRem(UInt16, UInt16)

Calcula el cociente y el resto de dos valores.

Equals(Object)

Devuelve un valor que indica si esta instancia es igual a un objeto especificado.

Equals(UInt16)

Devuelve un valor que indica si esta instancia es igual a un valor de UInt16 especificado.

GetHashCode()

Devuelve el código hash de esta instancia.

GetTypeCode()

Devuelve el TypeCode para el tipo de valor UInt16.

IsEvenInteger(UInt16)

Determina si un valor representa un número entero par.

IsOddInteger(UInt16)

Determina si un valor representa un número entero impar.

IsPow2(UInt16)

Determina si un valor es una potencia de dos.

LeadingZeroCount(UInt16)

Calcula el número de ceros iniciales en un valor.

Log2(UInt16)

Calcula el registro2 de un valor.

Max(UInt16, UInt16)

Compara dos valores con el proceso, que es mayor.

Min(UInt16, UInt16)

Compara dos valores con el proceso, que es menor.

Parse(ReadOnlySpan<Byte>, IFormatProvider)

Analiza un intervalo de caracteres UTF-8 en un valor.

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

Analiza un intervalo de caracteres UTF-8 en un valor.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Analiza un intervalo de caracteres en un valor.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Convierte la representación de intervalo de un número en un estilo y formato específico de la referencia cultural especificados en su entero de 16 bits sin signo equivalente.

Parse(String)

Convierte la representación de cadena de un número en su entero de 16 bits sin signo equivalente.

Parse(String, IFormatProvider)

Convierte la representación de cadena de un número en un formato específico de la referencia cultural especificado en su entero de 16 bits sin signo equivalente.

Parse(String, NumberStyles)

Convierte la representación de cadena de un número en un estilo especificado en su entero de 16 bits sin signo equivalente.

Este método no es compatible con CLS. La alternativa conforme a CLS es Parse(String, NumberStyles).

Parse(String, NumberStyles, IFormatProvider)

Convierte la representación de cadena de un número en un estilo y formato específico de la referencia cultural especificados en su entero de 16 bits sin signo equivalente.

PopCount(UInt16)

Calcula el número de bits que se establecen en un valor.

RotateLeft(UInt16, Int32)

Gira un valor de izquierda por una cantidad determinada.

RotateRight(UInt16, Int32)

Gira un valor a la derecha por una cantidad determinada.

Sign(UInt16)

Calcula el signo de un valor.

ToString()

Convierte el valor numérico de esta instancia en su representación de cadena equivalente.

ToString(IFormatProvider)

Convierte el valor numérico de esta instancia en su representación de cadena equivalente mediante la información de formato específica de la referencia cultural especificada.

ToString(String)

Convierte el valor numérico de esta instancia en su representación de cadena equivalente mediante el formato especificado.

ToString(String, IFormatProvider)

Convierte el valor numérico de esta instancia en su representación de cadena equivalente mediante el formato especificado y la información de formato específica de la referencia cultural.

TrailingZeroCount(UInt16)

Calcula el número de ceros finales en un valor.

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.

TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Intenta dar formato al valor de la instancia de número corto sin signo actual en el intervalo de caracteres proporcionado.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt16)

Intenta analizar un intervalo de caracteres UTF-8 en un valor.

TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UInt16)

Intenta analizar un intervalo de caracteres UTF-8 en un valor.

TryParse(ReadOnlySpan<Byte>, UInt16)

Intenta convertir un intervalo de caracteres UTF-8 que contenga la representación de cadena de un número en su entero de 16 bits sin signo equivalente.

TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt16)

Intenta analizar un intervalo de caracteres en un valor.

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt16)

Intenta convertir la representación de intervalo de un número en un estilo especificado y un formato específico de la referencia cultural a su entero de 16 bits sin signo equivalente. Un valor devuelto indica si la conversión se realizó correctamente o no.

TryParse(ReadOnlySpan<Char>, UInt16)

Intenta convertir la representación de intervalo de un número en su entero de 16 bits sin signo equivalente. Un valor devuelto indica si la conversión se realizó correctamente o no.

TryParse(String, IFormatProvider, UInt16)

Intenta analizar una cadena en un valor.

TryParse(String, NumberStyles, IFormatProvider, UInt16)

Intenta convertir la representación de cadena de un número en un estilo y formato específico de la referencia cultural especificados en su entero de 16 bits sin signo equivalente. Un valor devuelto indica si la conversión se realizó correctamente o no.

TryParse(String, UInt16)

Intenta convertir la representación de cadena de un número en su entero de 16 bits sin signo equivalente. Un valor devuelto indica si la conversión se realizó correctamente o no.

Implementaciones de interfaz explícitas

IAdditionOperators<UInt16,UInt16,UInt16>.Addition(UInt16, UInt16)

Agrega dos valores juntos para calcular su suma.

IAdditionOperators<UInt16,UInt16,UInt16>.CheckedAddition(UInt16, UInt16)

Agrega dos valores juntos para calcular su suma.

IAdditiveIdentity<UInt16,UInt16>.AdditiveIdentity

Obtiene la identidad de suma del tipo actual.

IBinaryInteger<UInt16>.GetByteCount()

Obtiene el número de bytes que se escribirán como parte de TryWriteLittleEndian(Span<Byte>, Int32).

IBinaryInteger<UInt16>.GetShortestBitLength()

Obtiene la longitud, en bits, de la representación complementaria de dos más corta del valor actual.

IBinaryInteger<UInt16>.TryReadBigEndian(ReadOnlySpan<Byte>, Boolean, UInt16)

Representa un entero de 16 bits sin signo.

IBinaryInteger<UInt16>.TryReadLittleEndian(ReadOnlySpan<Byte>, Boolean, UInt16)

Representa un entero de 16 bits sin signo.

IBinaryInteger<UInt16>.TryWriteBigEndian(Span<Byte>, Int32)

Intenta escribir el valor actual, en formato big-endian, en un intervalo determinado.

IBinaryInteger<UInt16>.TryWriteLittleEndian(Span<Byte>, Int32)

Intenta escribir el valor actual, en formato little-endian, en un intervalo determinado.

IBinaryNumber<UInt16>.AllBitsSet

Obtiene una instancia del tipo binario en el que se establecen todos los bits.

IBitwiseOperators<UInt16,UInt16,UInt16>.BitwiseAnd(UInt16, UInt16)

Calcula los valores bit a bit y de dos valores.

IBitwiseOperators<UInt16,UInt16,UInt16>.BitwiseOr(UInt16, UInt16)

Calcula el bit a bit o de dos valores.

IBitwiseOperators<UInt16,UInt16,UInt16>.ExclusiveOr(UInt16, UInt16)

Calcula el valor exclusivo o de dos valores.

IBitwiseOperators<UInt16,UInt16,UInt16>.OnesComplement(UInt16)

Calcula la representación ones-complement de un valor determinado.

IComparable.CompareTo(Object)

Compara esta instancia con un objeto especificado y devuelve una indicación de sus valores relativos.

IComparisonOperators<UInt16,UInt16,Boolean>.GreaterThan(UInt16, UInt16)

Compara dos valores para determinar cuál es mayor.

IComparisonOperators<UInt16,UInt16,Boolean>.GreaterThanOrEqual(UInt16, UInt16)

Compara dos valores para determinar cuál es mayor o igual.

IComparisonOperators<UInt16,UInt16,Boolean>.LessThan(UInt16, UInt16)

Compara dos valores para determinar cuál es menor.

IComparisonOperators<UInt16,UInt16,Boolean>.LessThanOrEqual(UInt16, UInt16)

Compara dos valores para determinar cuál es menor o igual.

IConvertible.GetTypeCode()

Devuelve el TypeCode para el tipo de valor UInt16.

IConvertible.ToBoolean(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToBoolean(IFormatProvider).

IConvertible.ToByte(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToByte(IFormatProvider).

IConvertible.ToChar(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToChar(IFormatProvider).

IConvertible.ToDateTime(IFormatProvider)

Esta conversión no se admite. Si se intenta usar este método, se produce un InvalidCastException.

IConvertible.ToDecimal(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToDecimal(IFormatProvider).

IConvertible.ToDouble(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToDouble(IFormatProvider).

IConvertible.ToInt16(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToInt16(IFormatProvider).

IConvertible.ToInt32(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToInt32(IFormatProvider).

IConvertible.ToInt64(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToInt64(IFormatProvider).

IConvertible.ToSByte(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToSByte(IFormatProvider).

IConvertible.ToSingle(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToSingle(IFormatProvider).

IConvertible.ToType(Type, IFormatProvider)

Para obtener una descripción de este miembro, consulte ToType(Type, IFormatProvider).

IConvertible.ToUInt16(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToUInt16(IFormatProvider).

IConvertible.ToUInt32(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToUInt32(IFormatProvider).

IConvertible.ToUInt64(IFormatProvider)

Para obtener una descripción de este miembro, consulte ToUInt64(IFormatProvider).

IDecrementOperators<UInt16>.CheckedDecrement(UInt16)

Disminuye un valor.

IDecrementOperators<UInt16>.Decrement(UInt16)

Disminuye un valor.

IDivisionOperators<UInt16,UInt16,UInt16>.Division(UInt16, UInt16)

Divide un valor por otro para calcular su cociente.

IEqualityOperators<UInt16,UInt16,Boolean>.Equality(UInt16, UInt16)

Compara dos valores para determinar la igualdad.

IEqualityOperators<UInt16,UInt16,Boolean>.Inequality(UInt16, UInt16)

Compara dos valores para determinar la desigualdad.

IIncrementOperators<UInt16>.CheckedIncrement(UInt16)

Incrementa un valor.

IIncrementOperators<UInt16>.Increment(UInt16)

Incrementa un valor.

IMinMaxValue<UInt16>.MaxValue

Obtiene el valor máximo del tipo actual.

IMinMaxValue<UInt16>.MinValue

Obtiene el valor mínimo del tipo actual.

IModulusOperators<UInt16,UInt16,UInt16>.Modulus(UInt16, UInt16)

Divide dos valores juntos para calcular su módulo o resto.

IMultiplicativeIdentity<UInt16,UInt16>.MultiplicativeIdentity

Obtiene la identidad multiplicativa del tipo actual.

IMultiplyOperators<UInt16,UInt16,UInt16>.CheckedMultiply(UInt16, UInt16)

Multiplica dos valores juntos para calcular su producto.

IMultiplyOperators<UInt16,UInt16,UInt16>.Multiply(UInt16, UInt16)

Multiplica dos valores juntos para calcular su producto.

INumber<UInt16>.CopySign(UInt16, UInt16)

Copia el signo de un valor en el signo de otro valor.

INumber<UInt16>.MaxNumber(UInt16, UInt16)

Compara dos valores con el proceso, que es mayor y devuelve el otro valor si una entrada es NaN.

INumber<UInt16>.MinNumber(UInt16, UInt16)

Compara dos valores con el proceso, que es menor y devuelve el otro valor si una entrada es NaN.

INumberBase<UInt16>.Abs(UInt16)

Calcula el valor absoluto de un valor.

INumberBase<UInt16>.IsCanonical(UInt16)

Determina si un valor está en su representación canónica.

INumberBase<UInt16>.IsComplexNumber(UInt16)

Determina si un valor representa un número complejo.

INumberBase<UInt16>.IsFinite(UInt16)

Determina si un valor es finito.

INumberBase<UInt16>.IsImaginaryNumber(UInt16)

Determina si un valor representa un número imaginario puro.

INumberBase<UInt16>.IsInfinity(UInt16)

Determina si un valor es infinito.

INumberBase<UInt16>.IsInteger(UInt16)

Determina si un valor representa un número entero.

INumberBase<UInt16>.IsNaN(UInt16)

Determina si un valor es NaN.

INumberBase<UInt16>.IsNegative(UInt16)

Determina si un valor es negativo.

INumberBase<UInt16>.IsNegativeInfinity(UInt16)

Determina si un valor es infinito negativo.

INumberBase<UInt16>.IsNormal(UInt16)

Determina si un valor es normal.

INumberBase<UInt16>.IsPositive(UInt16)

Determina si un valor es positivo.

INumberBase<UInt16>.IsPositiveInfinity(UInt16)

Determina si un valor es infinito positivo.

INumberBase<UInt16>.IsRealNumber(UInt16)

Determina si un valor representa un número real.

INumberBase<UInt16>.IsSubnormal(UInt16)

Determina si un valor es subnormal.

INumberBase<UInt16>.IsZero(UInt16)

Determina si un valor es cero.

INumberBase<UInt16>.MaxMagnitude(UInt16, UInt16)

Compara dos valores con el proceso, que es mayor.

INumberBase<UInt16>.MaxMagnitudeNumber(UInt16, UInt16)

Compara dos valores con el proceso que tiene la magnitud mayor y devuelve el otro valor si una entrada es NaN.

INumberBase<UInt16>.MinMagnitude(UInt16, UInt16)

Compara dos valores con el proceso, que es menor.

INumberBase<UInt16>.MinMagnitudeNumber(UInt16, UInt16)

Compara dos valores con el proceso que tiene la magnitud menor y devuelve el otro valor si una entrada es NaN.

INumberBase<UInt16>.MultiplyAddEstimate(UInt16, UInt16, UInt16)

Calcula una estimación de (left * right) + addend.

INumberBase<UInt16>.One

Obtiene el valor 1 para el tipo.

INumberBase<UInt16>.Radix

Obtiene el radix, o base, para el tipo .

INumberBase<UInt16>.TryConvertFromChecked<TOther>(TOther, UInt16)

Representa un entero de 16 bits sin signo.

INumberBase<UInt16>.TryConvertFromSaturating<TOther>(TOther, UInt16)

Representa un entero de 16 bits sin signo.

INumberBase<UInt16>.TryConvertFromTruncating<TOther>(TOther, UInt16)

Representa un entero de 16 bits sin signo.

INumberBase<UInt16>.TryConvertToChecked<TOther>(UInt16, TOther)

Intenta convertir una instancia del tipo actual en otro tipo, iniciando una excepción de desbordamiento para los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

INumberBase<UInt16>.TryConvertToSaturating<TOther>(UInt16, TOther)

Intenta convertir una instancia del tipo actual en otro tipo, saturando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

INumberBase<UInt16>.TryConvertToTruncating<TOther>(UInt16, TOther)

Intenta convertir una instancia del tipo actual en otro tipo, truncando los valores que se encuentran fuera del intervalo que se puede representar del tipo actual.

INumberBase<UInt16>.Zero

Obtiene el valor 0 para el tipo.

IShiftOperators<UInt16,Int32,UInt16>.LeftShift(UInt16, Int32)

Desplaza un valor dejado por una cantidad determinada.

IShiftOperators<UInt16,Int32,UInt16>.RightShift(UInt16, Int32)

Desplaza un valor hacia la derecha por una cantidad determinada.

IShiftOperators<UInt16,Int32,UInt16>.UnsignedRightShift(UInt16, Int32)

Desplaza un valor hacia la derecha por una cantidad determinada.

ISubtractionOperators<UInt16,UInt16,UInt16>.CheckedSubtraction(UInt16, UInt16)

Resta dos valores para calcular su diferencia.

ISubtractionOperators<UInt16,UInt16,UInt16>.Subtraction(UInt16, UInt16)

Resta dos valores para calcular su diferencia.

IUnaryNegationOperators<UInt16,UInt16>.CheckedUnaryNegation(UInt16)

Calcula la negación unaria activada de un valor.

IUnaryNegationOperators<UInt16,UInt16>.UnaryNegation(UInt16)

Calcula la negación unaria de un valor.

IUnaryPlusOperators<UInt16,UInt16>.UnaryPlus(UInt16)

Calcula la unaria más de un valor.

Se aplica a

Seguridad para subprocesos

Todos los miembros de este tipo son seguros para subprocesos. Los miembros que parecen modificar el estado de instancia devuelven realmente una nueva instancia inicializada con el nuevo valor. Al igual que con cualquier otro tipo, leer y escribir en una variable compartida que contenga una instancia de este tipo debe estar protegida por un bloqueo para garantizar la seguridad de los subprocesos.

Consulte también