Udostępnij za pośrednictwem


UInt16 Struktura

Definicja

Ważne

Ten interfejs API nie jest zgodny ze specyfikacją CLS.

Reprezentuje 16-bitową niepodpisaną liczbę całkowitą.

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
Dziedziczenie
UInt16
Atrybuty
Implementuje
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>

Uwagi

Typ UInt16 wartości reprezentuje niepodpisane liczby całkowite z wartościami od 0 do 65535.

Ważne

Typ UInt16 nie jest zgodny ze specyfikacją CLS. Alternatywnym typem zgodnym ze specyfikacją CLS jest Int32. Int16 Zamiast tego można zastąpić UInt16 wartość, która waha się od zera do Int16.MaxValue. Aby uzyskać więcej informacji na temat zgodności clS, zobacz Niezależność języka i składniki Language-Independent.

Struktura UInt16 udostępnia metody porównywania wystąpień tego typu, konwertowania wartości wystąpienia na reprezentację ciągu i konwertowania reprezentacji ciągu liczby na wystąpienie tego typu.

Aby uzyskać informacje o sposobie kontrolowania reprezentacji ciągów typów wartości, zobacz Formatting Types (Typy formatowania).

Pola

MaxValue

Reprezentuje największą możliwą wartość .UInt16 To pole jest stałe.

MinValue

Reprezentuje najmniejszą możliwą wartość .UInt16 To pole jest stałe.

Metody

Clamp(UInt16, UInt16, UInt16)

Zaciska wartość do wartości minimalnej i maksymalnej.

CompareTo(Object)

Porównuje to wystąpienie z określonym obiektem i zwraca wskazanie ich względnych wartości.

CompareTo(UInt16)

Porównuje to wystąpienie z określoną 16-bitową liczbą całkowitą bez znaku i zwraca wskazanie ich wartości względnych.

CreateChecked<TOther>(TOther)

Tworzy wystąpienie bieżącego typu na podstawie wartości, zgłaszając wyjątek przepełnienia dla wszystkich wartości, które wykraczają poza dopuszczalny zakres bieżącego typu.

CreateSaturating<TOther>(TOther)

Tworzy wystąpienie bieżącego typu na podstawie wartości, usytując wszystkie wartości, które wykraczają poza reprezentowany zakres bieżącego typu.

CreateTruncating<TOther>(TOther)

Tworzy wystąpienie bieżącego typu na podstawie wartości, obcinając wszystkie wartości, które znajdują się poza dopuszczalnym zakresem bieżącego typu.

DivRem(UInt16, UInt16)

Oblicza iloraz i pozostałą część dwóch wartości.

Equals(Object)

Zwraca wartość wskazującą, czy to wystąpienie jest równe podanemu obiektowi.

Equals(UInt16)

Zwraca wartość wskazującą, czy to wystąpienie jest równe określonej UInt16 wartości.

GetHashCode()

Zwraca wartość skrótu dla tego wystąpienia.

GetTypeCode()

Zwraca wartość TypeCode typu dla wartości UInt16.

IsEvenInteger(UInt16)

Określa, czy wartość reprezentuje liczbę całkowitą parzystą.

IsOddInteger(UInt16)

Określa, czy wartość reprezentuje nieparzystą liczbę całkowitą.

IsPow2(UInt16)

Określa, czy wartość jest potęgą dwóch.

LeadingZeroCount(UInt16)

Oblicza liczbę zer wiodących w wartości.

Log2(UInt16)

Oblicza dziennik2 wartości.

Max(UInt16, UInt16)

Porównuje dwie wartości do obliczeń, które są większe.

Min(UInt16, UInt16)

Porównuje dwie wartości do obliczeń, które są mniejsze.

Parse(ReadOnlySpan<Byte>, IFormatProvider)

Analizuje zakres znaków UTF-8 w wartości.

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

Analizuje zakres znaków UTF-8 w wartości.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Analizuje zakres znaków w wartości.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Konwertuje reprezentację zakresu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 16-bitowej liczby całkowitej bez znaku.

Parse(String)

Konwertuje ciąg reprezentujący liczbę na odpowiadającą mu 16-bitową liczbę całkowitą bez znaku.

Parse(String, IFormatProvider)

Konwertuje reprezentację ciągu liczby w określonym formacie specyficznym dla kultury na odpowiednik 16-bitowej liczby całkowitej bez znaku.

Parse(String, NumberStyles)

Konwertuje reprezentację ciągu liczby w określonym stylu na odpowiednik 16-bitowej liczby całkowitej bez znaku.

Ta metoda nie jest zgodna ze specyfikacją CLS. Alternatywą zgodną ze specyfikacją CLS jest Parse(String, NumberStyles).

Parse(String, NumberStyles, IFormatProvider)

Konwertuje reprezentację ciągu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 16-bitowej liczby całkowitej bez znaku.

PopCount(UInt16)

Oblicza liczbę bitów ustawionych w wartości.

RotateLeft(UInt16, Int32)

Obraca wartość pozostawioną przez daną kwotę.

RotateRight(UInt16, Int32)

Obraca wartość w prawo o daną kwotę.

Sign(UInt16)

Oblicza znak wartości.

ToString()

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację w postaci ciągu.

ToString(IFormatProvider)

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację w postaci ciągu przy użyciu podanych danych formatowania specyficznych dla kultury.

ToString(String)

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację ciągu przy użyciu określonego formatu.

ToString(String, IFormatProvider)

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację w postaci ciągu przy użyciu podanego formatu i informacji specyficznych dla kultury.

TrailingZeroCount(UInt16)

Oblicza liczbę końcowych zer w wartości.

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

Próbuje sformatować wartość bieżącego wystąpienia jako UTF-8 w podanym zakresie bajtów.

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

Próbuje sformatować wartość bieżącego niepodpisanego wystąpienia krótkiej liczby w podanym zakresie znaków.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt16)

Próbuje przeanalizować zakres znaków UTF-8 w wartość.

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

Próbuje przeanalizować zakres znaków UTF-8 w wartość.

TryParse(ReadOnlySpan<Byte>, UInt16)

Próbuje przekonwertować zakres znaków UTF-8 zawierający reprezentację ciągu liczby na odpowiednik 16-bitowej liczby całkowitej bez znaku.

TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt16)

Próbuje przeanalizować zakres znaków w wartości.

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

Próbuje przekonwertować reprezentację zakresu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 16-bitowej liczby całkowitej bez znaku. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

TryParse(ReadOnlySpan<Char>, UInt16)

Próbuje przekonwertować reprezentację zakresu liczby na odpowiednik 16-bitowej liczby całkowitej bez znaku. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

TryParse(String, IFormatProvider, UInt16)

Próbuje przeanalizować ciąg w wartość.

TryParse(String, NumberStyles, IFormatProvider, UInt16)

Próbuje przekonwertować reprezentację ciągu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 16-bitowej liczby całkowitej bez znaku. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

TryParse(String, UInt16)

Próbuje przekonwertować reprezentację ciągu liczby na 16-bitową niepodpisaną liczbę całkowitą równoważną. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

Jawne implementacje interfejsu

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

Dodaje dwie wartości w celu obliczenia ich sumy.

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

Dodaje dwie wartości w celu obliczenia ich sumy.

IAdditiveIdentity<UInt16,UInt16>.AdditiveIdentity

Pobiera tożsamość addytywnego bieżącego typu.

IBinaryInteger<UInt16>.GetByteCount()

Pobiera liczbę bajtów, które zostaną zapisane jako część .TryWriteLittleEndian(Span<Byte>, Int32)

IBinaryInteger<UInt16>.GetShortestBitLength()

Pobiera długość (w bitach) najkrótszej reprezentacji wartości bieżącej.

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

Reprezentuje 16-bitową niepodpisaną liczbę całkowitą.

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

Reprezentuje 16-bitową niepodpisaną liczbę całkowitą.

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

Próbuje zapisać bieżącą wartość w formacie big-endian dla danego zakresu.

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

Próbuje zapisać bieżącą wartość w formacie little-endian do danego zakresu.

IBinaryNumber<UInt16>.AllBitsSet

Pobiera wystąpienie typu binarnego, w którym są ustawione wszystkie bity.

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

Oblicza bitowe i dwie wartości.

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

Oblicza bitowe lub dwie wartości.

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

Oblicza wyłącznie lub dwie wartości.

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

Oblicza reprezentację danej wartości jako uzupełnienie jedynek.

IComparable.CompareTo(Object)

Porównuje to wystąpienie z określonym obiektem i zwraca wskazanie ich względnych wartości.

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

Porównuje dwie wartości, aby określić, które wartości są większe.

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

Porównuje dwie wartości, aby określić, które wartości są większe lub równe.

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

Porównuje dwie wartości, aby określić, które wartości są mniejsze.

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

Porównuje dwie wartości, aby określić, które wartości są mniejsze lub równe.

IConvertible.GetTypeCode()

Zwraca wartość TypeCode typu dla wartości UInt16.

IConvertible.ToBoolean(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToBoolean(IFormatProvider).

IConvertible.ToByte(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToByte(IFormatProvider).

IConvertible.ToChar(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToChar(IFormatProvider).

IConvertible.ToDateTime(IFormatProvider)

Ta konwersja nie jest obsługiwana. Próba użycia tej metody zgłasza błąd InvalidCastException.

IConvertible.ToDecimal(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToDecimal(IFormatProvider).

IConvertible.ToDouble(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToDouble(IFormatProvider).

IConvertible.ToInt16(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToInt16(IFormatProvider).

IConvertible.ToInt32(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToInt32(IFormatProvider).

IConvertible.ToInt64(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToInt64(IFormatProvider).

IConvertible.ToSByte(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToSByte(IFormatProvider).

IConvertible.ToSingle(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToSingle(IFormatProvider).

IConvertible.ToType(Type, IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToType(Type, IFormatProvider).

IConvertible.ToUInt16(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToUInt16(IFormatProvider).

IConvertible.ToUInt32(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToUInt32(IFormatProvider).

IConvertible.ToUInt64(IFormatProvider)

Aby uzyskać opis tego członka, zobacz ToUInt64(IFormatProvider).

IDecrementOperators<UInt16>.CheckedDecrement(UInt16)

Dekrementuje wartość.

IDecrementOperators<UInt16>.Decrement(UInt16)

Dekrementuje wartość.

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

Dzieli jedną wartość przez inną, aby obliczyć ich iloraz.

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

Porównuje dwie wartości w celu określenia równości.

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

Porównuje dwie wartości w celu określenia nierówności.

IIncrementOperators<UInt16>.CheckedIncrement(UInt16)

Zwiększa wartość.

IIncrementOperators<UInt16>.Increment(UInt16)

Zwiększa wartość.

IMinMaxValue<UInt16>.MaxValue

Pobiera maksymalną wartość bieżącego typu.

IMinMaxValue<UInt16>.MinValue

Pobiera minimalną wartość bieżącego typu.

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

Dzieli dwie wartości, aby obliczyć ich modulo lub resztę.

IMultiplicativeIdentity<UInt16,UInt16>.MultiplicativeIdentity

Pobiera tożsamość mnożenia bieżącego typu.

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

Mnoży dwie wartości, aby obliczyć swój produkt.

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

Mnoży dwie wartości, aby obliczyć swój produkt.

INumber<UInt16>.CopySign(UInt16, UInt16)

Kopiuje znak wartości do znaku innej wartości.

INumber<UInt16>.MaxNumber(UInt16, UInt16)

Porównuje dwie wartości do obliczeń, które są większe i zwracają drugą wartość, jeśli dane wejściowe to NaN.

INumber<UInt16>.MinNumber(UInt16, UInt16)

Porównuje dwie wartości do obliczeń, które są mniejsze i zwracają drugą wartość, jeśli dane wejściowe to NaN.

INumberBase<UInt16>.Abs(UInt16)

Oblicza wartość bezwzględną.

INumberBase<UInt16>.IsCanonical(UInt16)

Określa, czy wartość znajduje się w jego reprezentacji kanonicznej.

INumberBase<UInt16>.IsComplexNumber(UInt16)

Określa, czy wartość reprezentuje liczbę zespolonej.

INumberBase<UInt16>.IsFinite(UInt16)

Określa, czy wartość jest skończona.

INumberBase<UInt16>.IsImaginaryNumber(UInt16)

Określa, czy wartość reprezentuje czystą liczbę wyimaginowaną.

INumberBase<UInt16>.IsInfinity(UInt16)

Określa, czy wartość jest nieskończona.

INumberBase<UInt16>.IsInteger(UInt16)

Określa, czy wartość reprezentuje liczbę całkowitą.

INumberBase<UInt16>.IsNaN(UInt16)

Określa, czy wartość to NaN.

INumberBase<UInt16>.IsNegative(UInt16)

Określa, czy wartość jest ujemna.

INumberBase<UInt16>.IsNegativeInfinity(UInt16)

Określa, czy wartość jest ujemną nieskończonością.

INumberBase<UInt16>.IsNormal(UInt16)

Określa, czy wartość jest normalna.

INumberBase<UInt16>.IsPositive(UInt16)

Określa, czy wartość jest dodatnia.

INumberBase<UInt16>.IsPositiveInfinity(UInt16)

Określa, czy wartość jest dodatnią nieskończonością.

INumberBase<UInt16>.IsRealNumber(UInt16)

Określa, czy wartość reprezentuje liczbę rzeczywistą.

INumberBase<UInt16>.IsSubnormal(UInt16)

Określa, czy wartość jest podnormalna.

INumberBase<UInt16>.IsZero(UInt16)

Określa, czy wartość ma wartość zero.

INumberBase<UInt16>.MaxMagnitude(UInt16, UInt16)

Porównuje dwie wartości z obliczeniami, które są większe.

INumberBase<UInt16>.MaxMagnitudeNumber(UInt16, UInt16)

Porównuje dwie wartości do obliczeń o większej wielkości i zwraca inną wartość, jeśli dane wejściowe to NaN.

INumberBase<UInt16>.MinMagnitude(UInt16, UInt16)

Porównuje dwie wartości z obliczeniami, które są mniejsze.

INumberBase<UInt16>.MinMagnitudeNumber(UInt16, UInt16)

Porównuje dwie wartości do obliczeń o mniejszej wielkości i zwraca inną wartość, jeśli dane wejściowe to NaN.

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

Reprezentuje 16-bitową niepodpisaną liczbę całkowitą.

INumberBase<UInt16>.One

Pobiera wartość 1 typu.

INumberBase<UInt16>.Radix

Pobiera promienie lub podstawę dla typu.

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

Reprezentuje 16-bitową niepodpisaną liczbę całkowitą.

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

Reprezentuje 16-bitową niepodpisaną liczbę całkowitą.

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

Reprezentuje 16-bitową niepodpisaną liczbę całkowitą.

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

Próbuje przekonwertować wystąpienie bieżącego typu na inny typ, zgłaszając wyjątek przepełnienia dla wszystkich wartości, które wykraczają poza reprezentatywny zakres bieżącego typu.

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

Próbuje przekonwertować wystąpienie bieżącego typu na inny typ, saturując wszystkie wartości, które mieszczą się poza reprezentatywnym zakresem bieżącego typu.

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

Próbuje przekonwertować wystąpienie bieżącego typu na inny typ, obcinając wszystkie wartości, które mieszczą się poza reprezentatywnym zakresem bieżącego typu.

INumberBase<UInt16>.Zero

Pobiera wartość 0 typu.

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

Przesuwa wartość pozostawioną przez daną kwotę.

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

Przesuwa wartość w prawo o daną kwotę.

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

Przesuwa wartość w prawo o daną kwotę.

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

Odejmuje dwie wartości, aby obliczyć ich różnicę.

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

Odejmuje dwie wartości, aby obliczyć ich różnicę.

IUnaryNegationOperators<UInt16,UInt16>.CheckedUnaryNegation(UInt16)

Oblicza sprawdzoną jednoargumentową negację wartości.

IUnaryNegationOperators<UInt16,UInt16>.UnaryNegation(UInt16)

Oblicza jednoargumentowe negację wartości.

IUnaryPlusOperators<UInt16,UInt16>.UnaryPlus(UInt16)

Oblicza jednoargumentowy plus wartości.

Dotyczy

Bezpieczeństwo wątkowe

Wszystkie elementy członkowskie tego typu są bezpieczne wątkowo. Elementy członkowskie, które na pierwszy rzut oka modyfikują stan wystąpienia, w rzeczywistości zwracają nowe wystąpienie zainicjowane z nową wartością. Podobnie jak w przypadku innych typów odczytywanie i zapisywanie w udostępnionej zmiennej, która zawiera wystąpienie tego typu, musi być chronione przez blokadę w celu zagwarantowania bezpieczeństwa wątków.

Zobacz też