UInt16 結構

定義

重要

此 API 不符合 CLS 規範。

表示16位無符號整數。

public value class System::UInt16 : IComparable, IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, IFormattable
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, 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, 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<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)]
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)]
[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 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)>]
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)>]
[<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 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, 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 IComparable, IConvertible, IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IEquatable(Of UShort), IFormattable
繼承
UInt16
屬性
實作
IComparable IComparable<UInt16> IConvertible IEquatable<UInt16> IFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<UInt16> IParsable<TSelf> ISpanFormattable ISpanParsable<UInt16> ISpanParsable<TSelf> IUtf8SpanFormattable IUtf8SpanParsable<UInt16> IUtf8SpanParsable<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>

備註

UInt16 型別代表無符號整數,值範圍從 0 到 65535。

Important

UInt16 類型不符合CLS標準。 符合 CLS 標準的替代類型為 Int32Int16 也可以用來替換 UInt16 從零到 Int16.MaxValue範圍的值。 欲了解更多關於 CLS 合規性的資訊,請參閱 語言獨立性與 Language-Independent 元件

UInt16 結構提供比較此類實例的方法,將實例的值轉換為其字串表示法,並將數字的字串表示轉換為此類實例。

關於格式規範代碼如何控制值型別字串表示的資訊,請參見 格式類型

欄位

名稱 Description
MaxValue

代表 的最大 UInt16可能值。 此欄位是常數。

MinValue

代表最小 UInt16的可能值。 此欄位是常數。

方法

名稱 Description
Clamp(UInt16, UInt16, UInt16)

將值夾在內含最小值和最大值。

CompareTo(Object)

比較這個實例與指定的物件,並傳回其相對值的指示。

CompareTo(UInt16)

將此實例與指定的 16 位元無符號整數比較,並回傳其相對值的指示。

CreateChecked<TOther>(TOther)

從值建立目前型別的實例,針對落在目前類型可表示範圍以外的任何值擲回溢位例外狀況。

CreateSaturating<TOther>(TOther)

從值建立目前型別的實例,使落在目前類型可表示範圍以外的任何值飽和。

CreateTruncating<TOther>(TOther)

從值建立目前型別的實例,截斷任何落在目前類型可表示範圍以外的值。

DivRem(UInt16, UInt16)

計算兩個值的商數和餘數。

Equals(Object)

傳回值,指出這個實例是否等於指定的物件。

Equals(UInt16)

回傳一個值,表示該實例是否等於指定 UInt16 值。

GetHashCode()

傳回這個實例的哈希碼。

GetTypeCode()

回傳 TypeCode 的值型別 UInt16

IsEvenInteger(UInt16)

判斷值是否代表偶數整數。

IsOddInteger(UInt16)

判斷值是否代表奇數整數。

IsPow2(UInt16)

判斷值是否為兩個乘冪。

LeadingZeroCount(UInt16)

計算值中的前置零數目。

Log10(UInt16)

表示16位無符號整數。

Log2(UInt16)

計算 值的log2。

Max(UInt16, UInt16)

比較兩個值與計算,這兩個值更大。

Min(UInt16, UInt16)

比較兩個值與計算比較較少。

Parse(ReadOnlySpan<Byte>, IFormatProvider)

將UTF-8字元的範圍剖析為值。

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

將UTF-8字元的範圍剖析為值。

Parse(ReadOnlySpan<Char>, IFormatProvider)

將字元範圍剖析為值。

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

將指定樣式和特定文化特性格式的數位範圍表示轉換為其16位無符號整數對等專案。

Parse(String, IFormatProvider)

將指定之特定文化特性格式之數位的字串表示轉換為其相等的16位無符號整數。

Parse(String, NumberStyles, IFormatProvider)

將指定樣式和特定文化特性格式之數位的字串表示轉換為其16位無符號整數對等。

Parse(String, NumberStyles)

將指定樣式中數位的字串表示轉換成其16位不帶正負號的整數對等專案。

此方法不符合 CLS 標準。 符合 CLS 標準的替代方案為 Parse(String, NumberStyles)

Parse(String)

將數位的字串表示轉換為其相等的16位無符號整數。

PopCount(UInt16)

計算值中所設定的位數。

RotateLeft(UInt16, Int32)

以指定的數量旋轉值。

RotateRight(UInt16, Int32)

以指定的數量向右旋轉值。

Sign(UInt16)

計算值的符號。

ToString()

將這個實例的數值轉換為其相等的字串表示。

ToString(IFormatProvider)

利用指定的文化特定格式資訊,將此實例的數值轉換為其等效字串表示。

ToString(String, IFormatProvider)

使用指定的格式和文化特性特定格式資訊,將這個實例的數值轉換為其相等的字串表示。

ToString(String)

將此實例的數值轉換為其等效字串表示,並使用指定格式。

TrailingZeroCount(UInt16)

計算值中尾端零的數目。

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

嘗試將目前實例的值格式化為UTF-8到提供的位元組範圍。

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

嘗試將目前無號短數字實例的值格式化為所提供的字元區間。

TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt16)

嘗試將UTF-8字元的範圍剖析為值。

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

嘗試將UTF-8字元的範圍剖析為值。

TryParse(ReadOnlySpan<Byte>, UInt16)

嘗試將包含數位字串表示的UTF-8字元範圍轉換為其16位無符號整數對等專案。

TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt16)

嘗試將字元範圍剖析成值。

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

嘗試將指定樣式和特定文化特性格式的數位範圍表示轉換成其16位無符號整數對等專案。 傳回值表示轉換成功或失敗。

TryParse(ReadOnlySpan<Char>, UInt16)

嘗試將數字的範圍表示轉換成其16位無符號整數對等專案。 傳回值表示轉換成功或失敗。

TryParse(String, IFormatProvider, UInt16)

嘗試將字串剖析成值。

TryParse(String, NumberStyles, IFormatProvider, UInt16)

嘗試將指定樣式和特定文化特性格式之數位的字串表示轉換成其 16 位無符號整數對等專案。 傳回值表示轉換成功或失敗。

TryParse(String, UInt16)

嘗試將數位的字串表示轉換成其16位無符號整數對等專案。 傳回值表示轉換成功或失敗。

明確介面實作

名稱 Description
IAdditionOperators<UInt16,UInt16,UInt16>.Addition(UInt16, UInt16)

將兩個值加在一起以計算其總和。

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

將兩個值加在一起以計算其總和。

IAdditiveIdentity<UInt16,UInt16>.AdditiveIdentity

取得目前型別的加法識別。

IBinaryInteger<UInt16>.GetByteCount()

取得將被寫入為 TryWriteLittleEndian(Span<Byte>, Int32)的一部分的位元組數。

IBinaryInteger<UInt16>.GetShortestBitLength()

取得最短兩個目前值的補碼表示長度,以位為單位。

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

表示16位無符號整數。

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

表示16位無符號整數。

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

嘗試以 big-endian 格式將目前的值寫入指定的範圍。

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

嘗試將目前值以小到尾格式寫入指定的範圍。

IBinaryNumber<UInt16>.AllBitsSet

取得已設定所有位之二進位型別的實例。

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

計算兩個值的位和 。

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

計算兩個值的位或兩個值。

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

計算兩個值的獨佔或兩個值。

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

計算指定值的 ones-complement 表示法。

IComparable.CompareTo(Object)

比較這個實例與指定的物件,並傳回其相對值的指示。

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

比較兩個值,以判斷哪一個值更大。

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

比較兩個值,以判斷哪一個值大於或相等。

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

比較兩個值,以判斷哪一個值較少。

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

比較兩個值,以判斷哪一個值小於或相等。

IConvertible.GetTypeCode()

回傳 TypeCode 的值型別 UInt16

IConvertible.ToBoolean(IFormatProvider)

關於此成員的描述,請參見 ToBoolean(IFormatProvider)

IConvertible.ToByte(IFormatProvider)

關於此成員的描述,請參見 ToByte(IFormatProvider)

IConvertible.ToChar(IFormatProvider)

關於此成員的描述,請參見 ToChar(IFormatProvider)

IConvertible.ToDateTime(IFormatProvider)

此轉換不被支援。 嘗試使用此方法會拋出一個 InvalidCastException

IConvertible.ToDecimal(IFormatProvider)

關於此成員的描述,請參見 ToDecimal(IFormatProvider)

IConvertible.ToDouble(IFormatProvider)

關於此成員的描述,請參見 ToDouble(IFormatProvider)

IConvertible.ToInt16(IFormatProvider)

關於此成員的描述,請參見 ToInt16(IFormatProvider)

IConvertible.ToInt32(IFormatProvider)

關於此成員的描述,請參見 ToInt32(IFormatProvider)

IConvertible.ToInt64(IFormatProvider)

關於此成員的描述,請參見 ToInt64(IFormatProvider)

IConvertible.ToSByte(IFormatProvider)

關於此成員的描述,請參見 ToSByte(IFormatProvider)

IConvertible.ToSingle(IFormatProvider)

關於此成員的描述,請參見 ToSingle(IFormatProvider)

IConvertible.ToType(Type, IFormatProvider)

關於此成員的描述,請參見 ToType(Type, IFormatProvider)

IConvertible.ToUInt16(IFormatProvider)

關於此成員的描述,請參見 ToUInt16(IFormatProvider)

IConvertible.ToUInt32(IFormatProvider)

關於此成員的描述,請參見 ToUInt32(IFormatProvider)

IConvertible.ToUInt64(IFormatProvider)

關於此成員的描述,請參見 ToUInt64(IFormatProvider)

IDecrementOperators<UInt16>.CheckedDecrement(UInt16)

遞減值。

IDecrementOperators<UInt16>.Decrement(UInt16)

遞減值。

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

將一個值除以計算其商數。

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

比較兩個值以判斷相等。

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

比較兩個值以判斷不相等。

IIncrementOperators<UInt16>.CheckedIncrement(UInt16)

遞增值。

IIncrementOperators<UInt16>.Increment(UInt16)

遞增值。

IMinMaxValue<UInt16>.MaxValue

取得目前型別的最大值。

IMinMaxValue<UInt16>.MinValue

取得目前型別的最小值。

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

將兩個值分割在一起,以計算其模數或餘數。

IMultiplicativeIdentity<UInt16,UInt16>.MultiplicativeIdentity

取得目前型別的乘法識別。

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

將兩個值相乘以計算其產品。

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

將兩個值相乘以計算其產品。

INumber<UInt16>.CopySign(UInt16, UInt16)

將值的正負號複製到另一個值的正負號。

INumber<UInt16>.MaxNumber(UInt16, UInt16)

比較兩個值以計算較大的值,若輸入為 NaN則返回另一個值。

INumber<UInt16>.MinNumber(UInt16, UInt16)

比較兩個值以計算一個較小的值,若輸入為 NaN則返回另一個值。

INumberBase<UInt16>.Abs(UInt16)

計算值的絕對值。

INumberBase<UInt16>.IsCanonical(UInt16)

判斷值是否在其標準表示法中。

INumberBase<UInt16>.IsComplexNumber(UInt16)

判斷值是否代表複數。

INumberBase<UInt16>.IsFinite(UInt16)

判斷值是否有限。

INumberBase<UInt16>.IsImaginaryNumber(UInt16)

判斷值是否代表純虛數。

INumberBase<UInt16>.IsInfinity(UInt16)

判斷值是否為無限。

INumberBase<UInt16>.IsInteger(UInt16)

判斷值是否代表整數。

INumberBase<UInt16>.IsNaN(UInt16)

判斷值是否為 NaN。

INumberBase<UInt16>.IsNegative(UInt16)

判斷值是否為負值。

INumberBase<UInt16>.IsNegativeInfinity(UInt16)

判斷值是否為負無限大。

INumberBase<UInt16>.IsNormal(UInt16)

判斷值是否正常。

INumberBase<UInt16>.IsPositive(UInt16)

判斷值是否為正數。

INumberBase<UInt16>.IsPositiveInfinity(UInt16)

判斷值是否為正無限大。

INumberBase<UInt16>.IsRealNumber(UInt16)

判斷值是否代表實數。

INumberBase<UInt16>.IsSubnormal(UInt16)

判斷值是否為次正規。

INumberBase<UInt16>.IsZero(UInt16)

判斷值是否為零。

INumberBase<UInt16>.MaxMagnitude(UInt16, UInt16)

比較兩個值與計算,這兩個值更大。

INumberBase<UInt16>.MaxMagnitudeNumber(UInt16, UInt16)

比較兩個值以計算出哪個大小較大,若輸入為 NaN則返回另一個值。

INumberBase<UInt16>.MinMagnitude(UInt16, UInt16)

比較兩個值與計算比較較少。

INumberBase<UInt16>.MinMagnitudeNumber(UInt16, UInt16)

比較兩個值以計算大小較小的值,若輸入為 NaN則返回另一個值。

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

計算估計值為(left * right) + 。 addend

INumberBase<UInt16>.One

取得該類型的數值 1

INumberBase<UInt16>.Radix

取得型別的進位或基底。

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

表示16位無符號整數。

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

表示16位無符號整數。

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

表示16位無符號整數。

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

嘗試將目前類型的實例轉換成另一個類型,針對落在目前類型可表示範圍以外的任何值擲回溢位例外狀況。

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

嘗試將目前類型的實例轉換成另一個類型,使任何落在目前類型可表示範圍以外的值飽和。

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

嘗試將目前類型的實例轉換成另一個類型,截斷落在目前類型可表示範圍以外的任何值。

INumberBase<UInt16>.Zero

取得該類型的數值 0

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

將指定數量留下的值移位。

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

將值向右移位指定的數量。

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

將值向右移位指定的數量。

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

減去兩個值來計算其差異。

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

減去兩個值來計算其差異。

IUnaryNegationOperators<UInt16,UInt16>.CheckedUnaryNegation(UInt16)

計算值的已核取一元否定。

IUnaryNegationOperators<UInt16,UInt16>.UnaryNegation(UInt16)

計算值的一元負值。

IUnaryPlusOperators<UInt16,UInt16>.UnaryPlus(UInt16)

計算值的一元加號。

適用於

執行緒安全性

此類型的所有成員都是安全線程。 看似修改實例狀態的成員實際上會傳回以新值初始化的新實例。 如同任何其他類型,讀取和寫入包含此類型實例的共用變數必須受到鎖定的保護,以確保線程安全性。

另請參閱