Byte 構造体
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
8 ビット符号なし整数を表します。
public value class System::Byte : IComparable, IComparable<System::Byte>, IConvertible, IEquatable<System::Byte>, IFormattable
public value class System::Byte : IComparable, IComparable<System::Byte>, IConvertible, IEquatable<System::Byte>, ISpanFormattable
public value class System::Byte : IComparable<System::Byte>, IConvertible, IEquatable<System::Byte>, IParsable<System::Byte>, ISpanParsable<System::Byte>, System::Numerics::IAdditionOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IAdditiveIdentity<System::Byte, System::Byte>, System::Numerics::IBinaryInteger<System::Byte>, System::Numerics::IBinaryNumber<System::Byte>, System::Numerics::IBitwiseOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IComparisonOperators<System::Byte, System::Byte, bool>, System::Numerics::IDecrementOperators<System::Byte>, System::Numerics::IDivisionOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IEqualityOperators<System::Byte, System::Byte, bool>, System::Numerics::IIncrementOperators<System::Byte>, System::Numerics::IMinMaxValue<System::Byte>, System::Numerics::IModulusOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IMultiplicativeIdentity<System::Byte, System::Byte>, System::Numerics::IMultiplyOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::INumber<System::Byte>, System::Numerics::INumberBase<System::Byte>, System::Numerics::IShiftOperators<System::Byte, int, System::Byte>, System::Numerics::ISubtractionOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IUnaryNegationOperators<System::Byte, System::Byte>, System::Numerics::IUnaryPlusOperators<System::Byte, System::Byte>, System::Numerics::IUnsignedNumber<System::Byte>
public value class System::Byte : IComparable<System::Byte>, IConvertible, IEquatable<System::Byte>, IParsable<System::Byte>, ISpanParsable<System::Byte>, IUtf8SpanParsable<System::Byte>, System::Numerics::IAdditionOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IAdditiveIdentity<System::Byte, System::Byte>, System::Numerics::IBinaryInteger<System::Byte>, System::Numerics::IBinaryNumber<System::Byte>, System::Numerics::IBitwiseOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IComparisonOperators<System::Byte, System::Byte, bool>, System::Numerics::IDecrementOperators<System::Byte>, System::Numerics::IDivisionOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IEqualityOperators<System::Byte, System::Byte, bool>, System::Numerics::IIncrementOperators<System::Byte>, System::Numerics::IMinMaxValue<System::Byte>, System::Numerics::IModulusOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IMultiplicativeIdentity<System::Byte, System::Byte>, System::Numerics::IMultiplyOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::INumber<System::Byte>, System::Numerics::INumberBase<System::Byte>, System::Numerics::IShiftOperators<System::Byte, int, System::Byte>, System::Numerics::ISubtractionOperators<System::Byte, System::Byte, System::Byte>, System::Numerics::IUnaryNegationOperators<System::Byte, System::Byte>, System::Numerics::IUnaryPlusOperators<System::Byte, System::Byte>, System::Numerics::IUnsignedNumber<System::Byte>
public value class System::Byte : IComparable, IConvertible, IFormattable
public value class System::Byte : IComparable, IComparable<System::Byte>, IEquatable<System::Byte>, IFormattable
public struct Byte : IComparable, IComparable<byte>, IConvertible, IEquatable<byte>, IFormattable
public readonly struct Byte : IComparable, IComparable<byte>, IConvertible, IEquatable<byte>, IFormattable
public readonly struct Byte : IComparable, IComparable<byte>, IConvertible, IEquatable<byte>, ISpanFormattable
public readonly struct Byte : IComparable<byte>, IConvertible, IEquatable<byte>, IParsable<byte>, ISpanParsable<byte>, System.Numerics.IAdditionOperators<byte,byte,byte>, System.Numerics.IAdditiveIdentity<byte,byte>, System.Numerics.IBinaryInteger<byte>, System.Numerics.IBinaryNumber<byte>, System.Numerics.IBitwiseOperators<byte,byte,byte>, System.Numerics.IComparisonOperators<byte,byte,bool>, System.Numerics.IDecrementOperators<byte>, System.Numerics.IDivisionOperators<byte,byte,byte>, System.Numerics.IEqualityOperators<byte,byte,bool>, System.Numerics.IIncrementOperators<byte>, System.Numerics.IMinMaxValue<byte>, System.Numerics.IModulusOperators<byte,byte,byte>, System.Numerics.IMultiplicativeIdentity<byte,byte>, System.Numerics.IMultiplyOperators<byte,byte,byte>, System.Numerics.INumber<byte>, System.Numerics.INumberBase<byte>, System.Numerics.IShiftOperators<byte,int,byte>, System.Numerics.ISubtractionOperators<byte,byte,byte>, System.Numerics.IUnaryNegationOperators<byte,byte>, System.Numerics.IUnaryPlusOperators<byte,byte>, System.Numerics.IUnsignedNumber<byte>
public readonly struct Byte : IComparable<byte>, IConvertible, IEquatable<byte>, IParsable<byte>, ISpanParsable<byte>, IUtf8SpanParsable<byte>, System.Numerics.IAdditionOperators<byte,byte,byte>, System.Numerics.IAdditiveIdentity<byte,byte>, System.Numerics.IBinaryInteger<byte>, System.Numerics.IBinaryNumber<byte>, System.Numerics.IBitwiseOperators<byte,byte,byte>, System.Numerics.IComparisonOperators<byte,byte,bool>, System.Numerics.IDecrementOperators<byte>, System.Numerics.IDivisionOperators<byte,byte,byte>, System.Numerics.IEqualityOperators<byte,byte,bool>, System.Numerics.IIncrementOperators<byte>, System.Numerics.IMinMaxValue<byte>, System.Numerics.IModulusOperators<byte,byte,byte>, System.Numerics.IMultiplicativeIdentity<byte,byte>, System.Numerics.IMultiplyOperators<byte,byte,byte>, System.Numerics.INumber<byte>, System.Numerics.INumberBase<byte>, System.Numerics.IShiftOperators<byte,int,byte>, System.Numerics.ISubtractionOperators<byte,byte,byte>, System.Numerics.IUnaryNegationOperators<byte,byte>, System.Numerics.IUnaryPlusOperators<byte,byte>, System.Numerics.IUnsignedNumber<byte>
[System.Serializable]
public struct Byte : IComparable, IConvertible, IFormattable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct Byte : IComparable, IComparable<byte>, IConvertible, IEquatable<byte>, IFormattable
public struct Byte : IComparable, IComparable<byte>, IEquatable<byte>, IFormattable
type byte = struct
interface IConvertible
interface IFormattable
type byte = struct
interface IConvertible
interface ISpanFormattable
interface IFormattable
type byte = struct
interface IConvertible
interface IFormattable
interface IParsable<byte>
interface ISpanFormattable
interface ISpanParsable<byte>
interface IAdditionOperators<byte, byte, byte>
interface IAdditiveIdentity<byte, byte>
interface IBinaryInteger<byte>
interface IBinaryNumber<byte>
interface IBitwiseOperators<byte, byte, byte>
interface IComparisonOperators<byte, byte, bool>
interface IEqualityOperators<byte, byte, bool>
interface IDecrementOperators<byte>
interface IDivisionOperators<byte, byte, byte>
interface IIncrementOperators<byte>
interface IModulusOperators<byte, byte, byte>
interface IMultiplicativeIdentity<byte, byte>
interface IMultiplyOperators<byte, byte, byte>
interface INumber<byte>
interface INumberBase<byte>
interface ISubtractionOperators<byte, byte, byte>
interface IUnaryNegationOperators<byte, byte>
interface IUnaryPlusOperators<byte, byte>
interface IShiftOperators<byte, int, byte>
interface IMinMaxValue<byte>
interface IUnsignedNumber<byte>
type byte = struct
interface IConvertible
interface IFormattable
interface IParsable<byte>
interface ISpanFormattable
interface ISpanParsable<byte>
interface IAdditionOperators<byte, byte, byte>
interface IAdditiveIdentity<byte, byte>
interface IBinaryInteger<byte>
interface IBinaryNumber<byte>
interface IBitwiseOperators<byte, byte, byte>
interface IComparisonOperators<byte, byte, bool>
interface IEqualityOperators<byte, byte, bool>
interface IDecrementOperators<byte>
interface IDivisionOperators<byte, byte, byte>
interface IIncrementOperators<byte>
interface IModulusOperators<byte, byte, byte>
interface IMultiplicativeIdentity<byte, byte>
interface IMultiplyOperators<byte, byte, byte>
interface INumber<byte>
interface INumberBase<byte>
interface ISubtractionOperators<byte, byte, byte>
interface IUnaryNegationOperators<byte, byte>
interface IUnaryPlusOperators<byte, byte>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<byte>
interface IShiftOperators<byte, int, byte>
interface IMinMaxValue<byte>
interface IUnsignedNumber<byte>
type byte = struct
interface IConvertible
interface IFormattable
interface IParsable<byte>
interface ISpanFormattable
interface ISpanParsable<byte>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<byte>
interface IAdditionOperators<byte, byte, byte>
interface IAdditiveIdentity<byte, byte>
interface IBinaryInteger<byte>
interface IBinaryNumber<byte>
interface IBitwiseOperators<byte, byte, byte>
interface IComparisonOperators<byte, byte, bool>
interface IEqualityOperators<byte, byte, bool>
interface IDecrementOperators<byte>
interface IDivisionOperators<byte, byte, byte>
interface IIncrementOperators<byte>
interface IModulusOperators<byte, byte, byte>
interface IMultiplicativeIdentity<byte, byte>
interface IMultiplyOperators<byte, byte, byte>
interface INumber<byte>
interface INumberBase<byte>
interface ISubtractionOperators<byte, byte, byte>
interface IUnaryNegationOperators<byte, byte>
interface IUnaryPlusOperators<byte, byte>
interface IShiftOperators<byte, int, byte>
interface IMinMaxValue<byte>
interface IUnsignedNumber<byte>
[<System.Serializable>]
type byte = struct
interface IFormattable
interface IConvertible
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type byte = struct
interface IFormattable
interface IConvertible
type byte = struct
interface IFormattable
Public Structure Byte
Implements IComparable, IComparable(Of Byte), IConvertible, IEquatable(Of Byte), IFormattable
Public Structure Byte
Implements IComparable, IComparable(Of Byte), IConvertible, IEquatable(Of Byte), ISpanFormattable
Public Structure Byte
Implements IAdditionOperators(Of Byte, Byte, Byte), IAdditiveIdentity(Of Byte, Byte), IBinaryInteger(Of Byte), IBinaryNumber(Of Byte), IBitwiseOperators(Of Byte, Byte, Byte), IComparable(Of Byte), IComparisonOperators(Of Byte, Byte, Boolean), IConvertible, IDecrementOperators(Of Byte), IDivisionOperators(Of Byte, Byte, Byte), IEqualityOperators(Of Byte, Byte, Boolean), IEquatable(Of Byte), IIncrementOperators(Of Byte), IMinMaxValue(Of Byte), IModulusOperators(Of Byte, Byte, Byte), IMultiplicativeIdentity(Of Byte, Byte), IMultiplyOperators(Of Byte, Byte, Byte), INumber(Of Byte), INumberBase(Of Byte), IParsable(Of Byte), IShiftOperators(Of Byte, Integer, Byte), ISpanParsable(Of Byte), ISubtractionOperators(Of Byte, Byte, Byte), IUnaryNegationOperators(Of Byte, Byte), IUnaryPlusOperators(Of Byte, Byte), IUnsignedNumber(Of Byte)
Public Structure Byte
Implements IAdditionOperators(Of Byte, Byte, Byte), IAdditiveIdentity(Of Byte, Byte), IBinaryInteger(Of Byte), IBinaryNumber(Of Byte), IBitwiseOperators(Of Byte, Byte, Byte), IComparable(Of Byte), IComparisonOperators(Of Byte, Byte, Boolean), IConvertible, IDecrementOperators(Of Byte), IDivisionOperators(Of Byte, Byte, Byte), IEqualityOperators(Of Byte, Byte, Boolean), IEquatable(Of Byte), IIncrementOperators(Of Byte), IMinMaxValue(Of Byte), IModulusOperators(Of Byte, Byte, Byte), IMultiplicativeIdentity(Of Byte, Byte), IMultiplyOperators(Of Byte, Byte, Byte), INumber(Of Byte), INumberBase(Of Byte), IParsable(Of Byte), IShiftOperators(Of Byte, Integer, Byte), ISpanParsable(Of Byte), ISubtractionOperators(Of Byte, Byte, Byte), IUnaryNegationOperators(Of Byte, Byte), IUnaryPlusOperators(Of Byte, Byte), IUnsignedNumber(Of Byte), IUtf8SpanParsable(Of Byte)
Public Structure Byte
Implements IComparable, IConvertible, IFormattable
Public Structure Byte
Implements IComparable, IComparable(Of Byte), IEquatable(Of Byte), IFormattable
- 継承
- 属性
- 実装
-
IComparable IComparable<Byte> IConvertible IEquatable<Byte> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<Byte> IParsable<TSelf> ISpanParsable<Byte> ISpanParsable<TSelf> IAdditionOperators<Byte,Byte,Byte> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<Byte,Byte> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<Byte> IBinaryNumber<Byte> IBinaryNumber<TSelf> IBitwiseOperators<Byte,Byte,Byte> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<Byte,Byte,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<Byte> IDecrementOperators<TSelf> IDivisionOperators<Byte,Byte,Byte> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<Byte,Byte,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<Byte> IIncrementOperators<TSelf> IMinMaxValue<Byte> IModulusOperators<Byte,Byte,Byte> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<Byte,Byte> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<Byte,Byte,Byte> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<Byte> INumber<TSelf> INumberBase<Byte> INumberBase<TSelf> IShiftOperators<Byte,Int32,Byte> IShiftOperators<TSelf,Int32,TSelf> ISubtractionOperators<Byte,Byte,Byte> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<Byte,Byte> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<Byte,Byte> IUnaryPlusOperators<TSelf,TSelf> IUnsignedNumber<Byte> IUtf8SpanFormattable IUtf8SpanParsable<Byte> IUtf8SpanParsable<TSelf>
注釈
この API の詳細については、「Byte の 補足 API 解説」を参照してください。
フィールド
MaxValue |
Byte の最大有効値を表します。 このフィールドは定数です。 |
MinValue |
Byte の最小有効値を表します。 このフィールドは定数です。 |
メソッド
Clamp(Byte, Byte, Byte) |
値を包括的な最小値と最大値にクランプします。 |
CompareTo(Byte) |
指定した 8 ビット符号なし整数とこのインスタンスを比較し、これらの相対値を示す値を返します。 |
CompareTo(Object) |
指定したオブジェクトとこのインスタンスを比較し、これらの相対値を示す値を返します。 |
CreateChecked<TOther>(TOther) |
現在の型のインスタンスを値から作成し、現在の型の表現可能な範囲外にある値に対してオーバーフロー例外をスローします。 |
CreateSaturating<TOther>(TOther) |
現在の型のインスタンスを値から作成し、現在の型の表現可能な範囲外の値を飽和させます。 |
CreateTruncating<TOther>(TOther) |
現在の型のインスタンスを値から作成し、現在の型の表現可能な範囲外の値を切り捨てます。 |
DivRem(Byte, Byte) |
2 つの値の商と剰余を計算します。 |
Equals(Byte) |
このインスタンスと指定した Byte オブジェクトが同じ値を表しているかどうかを示す値を返します。 |
Equals(Object) |
このインスタンスが指定されたオブジェクトに等しいかどうかを示す値を返します。 |
GetHashCode() |
このインスタンスのハッシュ コードを返します。 |
GetTypeCode() | |
IsEvenInteger(Byte) |
値が偶数の整数を表すかどうかを判断します。 |
IsOddInteger(Byte) |
値が奇数の整数を表すかどうかを判断します。 |
IsPow2(Byte) |
値が 2 の累乗であるかどうかを判断します。 |
LeadingZeroCount(Byte) |
値の先頭の 0 の数を計算します。 |
Log2(Byte) |
値の log2 を計算します。 |
Max(Byte, Byte) |
2 つの値を比較して、より大きいコンピューティングを行います。 |
Min(Byte, Byte) |
2 つの値を比較して、より小さいコンピューティングを行います。 |
Parse(ReadOnlySpan<Byte>, IFormatProvider) |
UTF-8 文字のスパンを値に解析します。 |
Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider) |
UTF-8 文字のスパンを値に解析します。 |
Parse(ReadOnlySpan<Char>, IFormatProvider) |
文字のスパンを値に解析します。 |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
指定したスタイルおよびカルチャ固有の書式の数値のスパン表現を、それと等価の Byte に変換します。 |
Parse(String) |
数値の文字列形式を、それと等価の Byte に変換します。 |
Parse(String, IFormatProvider) |
指定されたカルチャ固有の書式で表現された文字列形式の数値を、それと等価の Byte に変換します。 |
Parse(String, NumberStyles) |
指定のスタイルで表現された数値の文字列形式を、それと等価な Byte に変換します。 |
Parse(String, NumberStyles, IFormatProvider) |
指定したスタイルおよびカルチャ固有の書式の数値の文字列形式を、それと等価の Byte に変換します。 |
PopCount(Byte) |
値に設定されているビット数を計算します。 |
RotateLeft(Byte, Int32) |
指定した量だけ値を左に回転します。 |
RotateRight(Byte, Int32) |
指定した量だけ値を右方向に回転します。 |
Sign(Byte) |
値の符号を計算します。 |
ToString() |
現在の Byte オブジェクトの値を等価の文字列形式に変換します。 |
ToString(IFormatProvider) |
指定したカルチャ固有の書式設定情報を使用して、現在の Byte オブジェクトの値をそれと等価な文字列形式に変換します。 |
ToString(String) |
指定した書式を使用して、現在の Byte オブジェクトの値をそれと等価な文字列形式に変換します。 |
ToString(String, IFormatProvider) |
指定した形式およびカルチャ固有の書式設定情報を使用して、現在の Byte オブジェクトの値をそれと等価の文字列形式に変換します。 |
TrailingZeroCount(Byte) |
値の末尾の 0 の数を計算します。 |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
現在のインスタンスの値を UTF-8 として指定されたバイトスパンに書式設定しようとします。 |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
現在の 8 ビットの符号なし整数インスタンスの値を、指定した文字スパンに書式設定しようとします。 |
TryParse(ReadOnlySpan<Byte>, Byte) |
数値の文字列表現を含む UTF-8 文字スパンを、等価の 8 ビット符号なし整数に変換しようとします。 |
TryParse(ReadOnlySpan<Byte>, IFormatProvider, Byte) |
UTF-8 文字のスパンを値に解析しようとします。 |
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, Byte) |
UTF-8 文字のスパンを値に解析しようとします。 |
TryParse(ReadOnlySpan<Char>, Byte) |
数値のスパン表現の、等価の Byte への変換を試み、変換に成功したかどうかを示す値を返します。 |
TryParse(ReadOnlySpan<Char>, IFormatProvider, Byte) |
文字のスパンを値に解析しようとします。 |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, Byte) |
指定したスタイルおよびカルチャ固有の書式の数値のスパン表現を、それと等価の Byte に変換します。 戻り値は変換が成功したか失敗したかを示します。 |
TryParse(String, Byte) |
数値の文字列形式を対応する Byte 表現に変換できるかどうかを試行し、変換に成功したかどうかを示す値を返します。 |
TryParse(String, IFormatProvider, Byte) |
文字列を値に解析しようとします。 |
TryParse(String, NumberStyles, IFormatProvider, Byte) |
指定したスタイルおよびカルチャ固有の書式の数値の文字列形式を、それと等価の Byte に変換します。 戻り値は変換が成功したか失敗したかを示します。 |
明示的なインターフェイスの実装
適用対象
スレッド セーフ
この型のすべてのメンバーはスレッド セーフです。 インスタンスの状態を変更するように見えるメンバーは、実際には新しい値で初期化された新しいインスタンスを返します。 他の型と同様に、この型のインスタンスを含む共有変数の読み取りと書き込みは、スレッドセーフを保証するためにロックによって保護する必要があります。
こちらもご覧ください
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示