UInt16 構造体
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
重要
この API は CLS 準拠ではありません。
16 ビット符号なし整数を表します。
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>, IUtf8SpanFormattable, 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>, IUtf8SpanFormattable, 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 IUtf8SpanParsable<uint16>
interface IShiftOperators<uint16, int, uint16>
interface IMinMaxValue<uint16>
interface IUnsignedNumber<uint16>
interface IUtf8SpanFormattable
[<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), IUtf8SpanFormattable, IUtf8SpanParsable(Of UShort)
Public Structure UInt16
Implements IComparable, IConvertible, IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IEquatable(Of UShort), IFormattable
- 継承
- 属性
- 実装
-
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>
注釈
値型は UInt16 、0 ~ 65535 の範囲の値を持つ符号なし整数を表します。
重要
型が UInt16 CLS に準拠していません。 CLS 準拠の代替型は です Int32。 Int16 代わりに を使用して、0 から の範囲の UInt16 値を Int16.MaxValue置き換えることができます。 CLS コンプライアンスの詳細については、「 Language Independence and Language-Independent Components」を参照してください。
構造体は UInt16 、この型のインスタンスを比較し、インスタンスの値をその文字列表現に変換し、数値の文字列表現をこの型のインスタンスに変換するメソッドを提供します。
書式指定コードが値型の文字列表現を制御する方法については、「 型の書式設定」を参照してください。
フィールド
MaxValue |
UInt16 の最大有効値を表します。 このフィールドは定数です。 |
MinValue |
UInt16 の最小有効値を表します。 このフィールドは定数です。 |
メソッド
Clamp(UInt16, UInt16, UInt16) |
値を包括的な最小値と最大値にクランプします。 |
CompareTo(Object) |
指定したオブジェクトとこのインスタンスを比較し、これらの相対値を示す値を返します。 |
CompareTo(UInt16) |
指定した 16 ビット符号なし整数とこのインスタンスを比較し、これらの相対値を示す値を返します。 |
CreateChecked<TOther>(TOther) |
現在の型のインスタンスを値から作成し、現在の型の表現可能な範囲外の値に対してオーバーフロー例外をスローします。 |
CreateSaturating<TOther>(TOther) |
現在の型のインスタンスを値から作成し、現在の型の表現可能な範囲外の値を飽和させます。 |
CreateTruncating<TOther>(TOther) |
現在の型のインスタンスを値から作成し、現在の型の表現可能な範囲外の値を切り捨てます。 |
DivRem(UInt16, UInt16) |
2 つの値の商と剰余を計算します。 |
Equals(Object) |
このインスタンスが指定されたオブジェクトに等しいかどうかを示す値を返します。 |
Equals(UInt16) |
このインスタンスが指定した UInt16 値に等しいかどうかを示す値を返します。 |
GetHashCode() |
このインスタンスのハッシュ コードを返します。 |
GetTypeCode() | |
IsEvenInteger(UInt16) |
値が偶数の整数を表すかどうかを判断します。 |
IsOddInteger(UInt16) |
値が奇数の整数を表すかどうかを判断します。 |
IsPow2(UInt16) |
値が 2 の累乗であるかどうかを判断します。 |
LeadingZeroCount(UInt16) |
値の先頭の 0 の数を計算します。 |
Log2(UInt16) |
値の log2 を計算します。 |
Max(UInt16, UInt16) |
2 つの値を、より大きいコンピューティングと比較します。 |
Min(UInt16, UInt16) |
2 つの値を比較して計算します。この値は小さくなります。 |
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) |
数値の文字列形式を、それと等価な 16 ビット符号なし整数に変換します。 |
Parse(String, IFormatProvider) |
指定したカルチャ固有の書式による数値の文字列形式を、それと等価な 16 ビット符号なし整数に変換します。 |
Parse(String, NumberStyles) |
指定したスタイルの数値の文字列形式を、それと等価な 16 ビット符号なし整数に変換します。 このメソッドは、CLS 準拠ではありません。 CLS 準拠の代わりとして Parse(String, NumberStyles) を使用できます。 |
Parse(String, NumberStyles, IFormatProvider) |
指定したスタイルおよびカルチャ固有の書式による数値の文字列形式を、それと等価な 16 ビット符号なし整数に変換します。 |
PopCount(UInt16) |
値に設定されているビット数を計算します。 |
RotateLeft(UInt16, Int32) |
指定した量だけ値を左に回転します。 |
RotateRight(UInt16, Int32) |
指定した量だけ値を右に回転します。 |
Sign(UInt16) |
値の符号を計算します。 |
ToString() |
このインスタンスの数値を、それと等価な文字列形式に変換します。 |
ToString(IFormatProvider) |
このインスタンスの数値を、指定したカルチャ固有の書式情報を使用して、それと等価な文字列形式に変換します。 |
ToString(String) |
このインスタンスの数値を、指定した書式を使用して、それと等価な文字列形式に変換します。 |
ToString(String, IFormatProvider) |
このインスタンスの数値を、指定した書式およびカルチャ固有の書式情報を使用して、それと等価な文字列形式に変換します。 |
TrailingZeroCount(UInt16) |
値の末尾の 0 の数を計算します。 |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
現在のインスタンスの値を UTF-8 として指定されたバイトスパンに書式設定しようとします。 |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
現在の符号なし short 型数値インスタンスの値の、指定した文字スパンへの書式設定を試みます。 |
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 ビット符号なし整数に変換します。 戻り値は変換が成功したか失敗したかを示します。 |
明示的なインターフェイスの実装
適用対象
スレッド セーフ
この型のすべてのメンバーはスレッド セーフです。 インスタンスの状態を変更するように見えるメンバーは、実際には新しい値で初期化された新しいインスタンスを返します。 他の型と同様に、この型のインスタンスを含む共有変数の読み取りと書き込みは、スレッドの安全性を保証するためにロックによって保護する必要があります。