Condividi tramite


UInt16 Struct

Definizione

Importante

Questa API non è conforme a CLS.

Rappresenta un intero senza segno a 16 bit.

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
Ereditarietà
UInt16
Attributi
Implementazioni
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>

Commenti

Il UInt16 tipo di valore rappresenta interi senza segno con valori compresi tra 0 e 65535.

Importante

Il UInt16 tipo non è conforme a CLS. Il tipo alternativo conforme a CLS è Int32. Int16 può essere usato invece per sostituire un UInt16 valore compreso tra zero e Int16.MaxValue. Per altre informazioni sulla conformità a CLS, vedere Language Independence and Language-Independent Components.For more information about CLS compliance, see Language Independence and Language-Independent Components.

La UInt16 struttura fornisce metodi per confrontare le istanze di questo tipo, convertire il valore di un'istanza nella relativa rappresentazione di stringa e convertire la rappresentazione di stringa di un numero in un'istanza di questo tipo.

Per informazioni su come i codici di specifica del formato controllano la rappresentazione di stringa dei tipi valore, vedere Formattazione dei tipi.

Campi

MaxValue

Rappresenta il valore massimo possibile di UInt16. Questo campo è costante.

MinValue

Rappresenta il valore più piccolo possibile di UInt16. Questo campo è costante.

Metodi

Clamp(UInt16, UInt16, UInt16)

Blocca un valore a un valore minimo e massimo inclusivo.

CompareTo(Object)

Confronta questa istanza con un oggetto specificato e restituisce un'indicazione dei valori relativi.

CompareTo(UInt16)

Confronta questa istanza con un intero senza segno a 16 bit specificato e restituisce un'indicazione dei valori relativi.

CreateChecked<TOther>(TOther)

Crea un'istanza del tipo corrente da un valore, che genera un'eccezione di overflow per tutti i valori che non rientrano nell'intervallo rappresentabile del tipo corrente.

CreateSaturating<TOther>(TOther)

Crea un'istanza del tipo corrente da un valore, saturando tutti i valori che non rientrano nell'intervallo rappresentabile del tipo corrente.

CreateTruncating<TOther>(TOther)

Crea un'istanza del tipo corrente da un valore, troncando tutti i valori che non rientrano nell'intervallo rappresentabile del tipo corrente.

DivRem(UInt16, UInt16)

Calcola il quoziente e il resto di due valori.

Equals(Object)

Restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

Equals(UInt16)

Restituisce un valore che indica se l'istanza è uguale a un valore UInt16 specificato.

GetHashCode()

Restituisce il codice hash per l'istanza.

GetTypeCode()

Restituisce l'oggetto TypeCode del tipo di valore UInt16.

IsEvenInteger(UInt16)

Determina se un valore rappresenta un numero integrale pari.

IsOddInteger(UInt16)

Determina se un valore rappresenta un numero integrale dispari.

IsPow2(UInt16)

Determina se un valore è una potenza di due.

LeadingZeroCount(UInt16)

Calcola il numero di zeri iniziali in un valore.

Log2(UInt16)

Calcola il log2 di un valore.

Max(UInt16, UInt16)

Confronta due valori con il calcolo maggiore.

Min(UInt16, UInt16)

Confronta due valori con il calcolo minore.

Parse(ReadOnlySpan<Byte>, IFormatProvider)

Analizza un intervallo di caratteri UTF-8 in un valore.

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

Analizza un intervallo di caratteri UTF-8 in un valore.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Analizza un intervallo di caratteri in un valore.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Converte la rappresentazione in forma di intervallo di un numero in uno stile e in un formato specifico delle impostazioni cultura specificati nell'equivalente intero senza segno a 16 bit.

Parse(String)

Converte la rappresentazione di stringa di un numero nel suo equivalente intero senza segno a 16 bit.

Parse(String, IFormatProvider)

Converte la rappresentazione di stringa di un numero in un formato specifico delle impostazioni cultura nel suo equivalente intero senza segno a 16 bit.

Parse(String, NumberStyles)

Converte la rappresentazione di stringa di un numero in uno stile specificato nel suo equivalente intero senza segno a 16 bit.

Questo metodo non è conforme a CLS. L'alternativa conforme a CLS è Parse(String, NumberStyles).

Parse(String, NumberStyles, IFormatProvider)

Converte la rappresentazione di stringa di un numero in uno stile specificato e in un formato specifico delle impostazioni cultura nell'equivalente intero senza segno a 16 bit.

PopCount(UInt16)

Calcola il numero di bit impostati in un valore.

RotateLeft(UInt16, Int32)

Ruota un valore lasciato da una determinata quantità.

RotateRight(UInt16, Int32)

Ruota un valore a destra di una determinata quantità.

Sign(UInt16)

Calcola il segno di un valore.

ToString()

Converte il valore numerico dell'istanza nella rappresentazione di stringa equivalente.

ToString(IFormatProvider)

Converte il valore numerico di questa istanza nella rappresentazione di stringa equivalente usando le informazioni di formato specifiche delle impostazioni cultura.

ToString(String)

Converte il valore numerico dell'istanza corrente nella rappresentazione di stringa equivalente, usando il formato specificato.

ToString(String, IFormatProvider)

Converte il valore numerico dell'istanza nella rappresentazione di stringa equivalente usando il formato specificato e le informazioni di formattazione specifiche delle impostazioni cultura.

TrailingZeroCount(UInt16)

Calcola il numero di zeri finali in un valore.

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

Tenta di formattare il valore dell'istanza corrente come UTF-8 nell'intervallo di byte specificato.

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

Tenta di formattare il valore dell'istanza di numero breve senza segno corrente nell'intervallo di caratteri specificato.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt16)

Tenta di analizzare un intervallo di caratteri UTF-8 in un valore.

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

Tenta di analizzare un intervallo di caratteri UTF-8 in un valore.

TryParse(ReadOnlySpan<Byte>, UInt16)

Tenta di convertire un intervallo di caratteri UTF-8 contenente la rappresentazione di stringa di un numero nell'equivalente intero senza segno a 16 bit.

TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt16)

Tenta di analizzare un intervallo di caratteri in un valore.

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

Tenta di convertire la rappresentazione in forma di intervallo di un numero in uno stile e in un formato specifico delle impostazioni cultura specificati nel relativo intero senza segno a 16 bit equivalente. Un valore restituito indica se la conversione è riuscita o meno.

TryParse(ReadOnlySpan<Char>, UInt16)

Tenta di convertire la rappresentazione in forma di intervallo di un numero nel relativo intero senza segno a 16 bit equivalente. Un valore restituito indica se la conversione è riuscita o meno.

TryParse(String, IFormatProvider, UInt16)

Tenta di analizzare una stringa in un valore.

TryParse(String, NumberStyles, IFormatProvider, UInt16)

Prova a convertire la rappresentazione di stringa di un numero in uno stile e in un formato specifico delle impostazioni cultura specificati nel relativo intero senza segno a 16 bit equivalente. Un valore restituito indica se la conversione è riuscita o meno.

TryParse(String, UInt16)

Prova a convertire la rappresentazione di stringa di un numero nel relativo intero senza segno a 16 bit equivalente. Un valore restituito indica se la conversione è riuscita o meno.

Implementazioni dell'interfaccia esplicita

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

Aggiunge due valori insieme per calcolare la somma.

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

Aggiunge due valori insieme per calcolare la somma.

IAdditiveIdentity<UInt16,UInt16>.AdditiveIdentity

Ottiene l'identità aggiuntiva del tipo corrente.

IBinaryInteger<UInt16>.GetByteCount()

Ottiene il numero di byte che verranno scritti come parte di TryWriteLittleEndian(Span<Byte>, Int32).

IBinaryInteger<UInt16>.GetShortestBitLength()

Ottiene la lunghezza, espressa in bit, della rappresentazione di complemento più breve del valore corrente.

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

Rappresenta un intero senza segno a 16 bit.

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

Rappresenta un intero senza segno a 16 bit.

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

Tenta di scrivere il valore corrente, in formato big-endian, in un determinato intervallo.

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

Tenta di scrivere il valore corrente, in formato little-endian, in un determinato intervallo.

IBinaryNumber<UInt16>.AllBitsSet

Ottiene un'istanza del tipo binario in cui vengono impostati tutti i bit.

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

Calcola i valori bit per bit e di due valori.

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

Calcola i valori bit per bit o di due valori.

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

Calcola l'esclusivo o di due valori.

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

Calcola la rappresentazione di complemento di un determinato valore.

IComparable.CompareTo(Object)

Confronta questa istanza con un oggetto specificato e restituisce un'indicazione dei valori relativi.

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

Confronta due valori per determinare quale è maggiore.

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

Confronta due valori per determinare quale è maggiore o uguale.

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

Confronta due valori per determinare quale è minore.

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

Confronta due valori per determinare quale è minore o uguale.

IConvertible.GetTypeCode()

Restituisce l'oggetto TypeCode del tipo di valore UInt16.

IConvertible.ToBoolean(IFormatProvider)

Per una descrizione di questo membro, vedere ToBoolean(IFormatProvider).

IConvertible.ToByte(IFormatProvider)

Per una descrizione di questo membro, vedere ToByte(IFormatProvider).

IConvertible.ToChar(IFormatProvider)

Per una descrizione di questo membro, vedere ToChar(IFormatProvider).

IConvertible.ToDateTime(IFormatProvider)

Questa conversione non è supportata. Il tentativo di usare questo metodo genera un'eccezione InvalidCastException.

IConvertible.ToDecimal(IFormatProvider)

Per una descrizione di questo membro, vedere ToDecimal(IFormatProvider).

IConvertible.ToDouble(IFormatProvider)

Per una descrizione di questo membro, vedere ToDouble(IFormatProvider).

IConvertible.ToInt16(IFormatProvider)

Per una descrizione di questo membro, vedere ToInt16(IFormatProvider).

IConvertible.ToInt32(IFormatProvider)

Per una descrizione di questo membro, vedere ToInt32(IFormatProvider).

IConvertible.ToInt64(IFormatProvider)

Per una descrizione di questo membro, vedere ToInt64(IFormatProvider).

IConvertible.ToSByte(IFormatProvider)

Per una descrizione di questo membro, vedere ToSByte(IFormatProvider).

IConvertible.ToSingle(IFormatProvider)

Per una descrizione di questo membro, vedere ToSingle(IFormatProvider).

IConvertible.ToType(Type, IFormatProvider)

Per una descrizione di questo membro, vedere ToType(Type, IFormatProvider).

IConvertible.ToUInt16(IFormatProvider)

Per una descrizione di questo membro, vedere ToUInt16(IFormatProvider).

IConvertible.ToUInt32(IFormatProvider)

Per una descrizione di questo membro, vedere ToUInt32(IFormatProvider).

IConvertible.ToUInt64(IFormatProvider)

Per una descrizione di questo membro, vedere ToUInt64(IFormatProvider).

IDecrementOperators<UInt16>.CheckedDecrement(UInt16)

Decrementa un valore.

IDecrementOperators<UInt16>.Decrement(UInt16)

Decrementa un valore.

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

Divide un valore per un altro per calcolare il quoziente.

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

Confronta due valori per determinare l'uguaglianza.

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

Confronta due valori per determinare la disuguaglianza.

IIncrementOperators<UInt16>.CheckedIncrement(UInt16)

Incrementa un valore.

IIncrementOperators<UInt16>.Increment(UInt16)

Incrementa un valore.

IMinMaxValue<UInt16>.MaxValue

Ottiene il valore massimo del tipo corrente.

IMinMaxValue<UInt16>.MinValue

Ottiene il valore minimo del tipo corrente.

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

Divide due valori insieme per calcolare il modulo o il resto.

IMultiplicativeIdentity<UInt16,UInt16>.MultiplicativeIdentity

Ottiene l'identità moltiplicativa del tipo corrente.

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

Moltiplica due valori insieme per calcolare il prodotto.

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

Moltiplica due valori insieme per calcolare il prodotto.

INumber<UInt16>.CopySign(UInt16, UInt16)

Copia il segno di un valore nel segno di un altro valore.

INumber<UInt16>.MaxNumber(UInt16, UInt16)

Confronta due valori con il calcolo che è maggiore e restituisce l'altro valore se un input è NaN.

INumber<UInt16>.MinNumber(UInt16, UInt16)

Confronta due valori con il calcolo minore e restituendo l'altro valore se un input è NaN.

INumberBase<UInt16>.Abs(UInt16)

Calcola l'assoluto di un valore.

INumberBase<UInt16>.IsCanonical(UInt16)

Determina se un valore è nella relativa rappresentazione canonica.

INumberBase<UInt16>.IsComplexNumber(UInt16)

Determina se un valore rappresenta un numero complesso.

INumberBase<UInt16>.IsFinite(UInt16)

Determina se un valore è finito.

INumberBase<UInt16>.IsImaginaryNumber(UInt16)

Determina se un valore rappresenta un numero immaginario puro.

INumberBase<UInt16>.IsInfinity(UInt16)

Determina se un valore è infinito.

INumberBase<UInt16>.IsInteger(UInt16)

Determina se un valore rappresenta un numero integrale.

INumberBase<UInt16>.IsNaN(UInt16)

Determina se un valore è NaN.

INumberBase<UInt16>.IsNegative(UInt16)

Determina se un valore è negativo.

INumberBase<UInt16>.IsNegativeInfinity(UInt16)

Determina se un valore è infinito negativo.

INumberBase<UInt16>.IsNormal(UInt16)

Determina se un valore è normale.

INumberBase<UInt16>.IsPositive(UInt16)

Determina se un valore è positivo.

INumberBase<UInt16>.IsPositiveInfinity(UInt16)

Determina se un valore è infinito positivo.

INumberBase<UInt16>.IsRealNumber(UInt16)

Determina se un valore rappresenta un numero reale.

INumberBase<UInt16>.IsSubnormal(UInt16)

Determina se un valore è sottonormaale.

INumberBase<UInt16>.IsZero(UInt16)

Determina se un valore è zero.

INumberBase<UInt16>.MaxMagnitude(UInt16, UInt16)

Confronta due valori con il calcolo maggiore.

INumberBase<UInt16>.MaxMagnitudeNumber(UInt16, UInt16)

Confronta due valori con il calcolo che ha la grandezza maggiore e restituisce l'altro valore se un input è NaN.

INumberBase<UInt16>.MinMagnitude(UInt16, UInt16)

Confronta due valori con il calcolo minore.

INumberBase<UInt16>.MinMagnitudeNumber(UInt16, UInt16)

Confronta due valori con il calcolo con la grandezza minore e restituendo l'altro valore se un input è NaN.

INumberBase<UInt16>.One

Ottiene il valore 1 per il tipo.

INumberBase<UInt16>.Radix

Ottiene il radix, o base, per il tipo .

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

Rappresenta un intero senza segno a 16 bit.

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

Rappresenta un intero senza segno a 16 bit.

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

Rappresenta un intero senza segno a 16 bit.

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

Tenta di convertire un'istanza del tipo corrente in un altro tipo, generando un'eccezione di overflow per tutti i valori che non rientrano nell'intervallo rappresentabile del tipo corrente.

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

Tenta di convertire un'istanza del tipo corrente in un altro tipo, saturazione di tutti i valori che non rientrano nell'intervallo rappresentabile del tipo corrente.

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

Tenta di convertire un'istanza del tipo corrente in un altro tipo, troncando tutti i valori che non rientrano nell'intervallo rappresentabile del tipo corrente.

INumberBase<UInt16>.Zero

Ottiene il valore 0 per il tipo.

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

Sposta un valore lasciato da un determinato importo.

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

Sposta un valore a destra in base a una determinata quantità.

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

Sposta un valore a destra in base a una determinata quantità.

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

Sottrae due valori per calcolare la differenza.

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

Sottrae due valori per calcolare la differenza.

IUnaryNegationOperators<UInt16,UInt16>.CheckedUnaryNegation(UInt16)

Calcola la negazione unaria controllata di un valore.

IUnaryNegationOperators<UInt16,UInt16>.UnaryNegation(UInt16)

Calcola la negazione unaria di un valore.

IUnaryPlusOperators<UInt16,UInt16>.UnaryPlus(UInt16)

Calcola il segno più unario di un valore.

Si applica a

Thread safety

Tutti i membri di questo tipo sono thread-safe. I membri che sembrano modificare lo stato dell'istanza restituiscono effettivamente una nuova istanza inizializzata con il nuovo valore. Come per qualsiasi altro tipo, la lettura e la scrittura in una variabile condivisa che contiene un'istanza di questo tipo devono essere protette da un blocco per garantire la thread safety.

Vedi anche