struct byte

in global :: System

Represents an 8-bit unsigned integer.


public int CompareTo( byte value )

Compares this instance to a specified 8-bit unsigned integer and returns an indication of their relative values.

  • value An 8-bit unsigned integer to compare.
  • Returns A signed integer that indicates the relative order of this instance and . Return Value Description Less than zero This instance is less than . Zero This instance is equal to . Greater than zero This instance is greater than .

public int CompareTo( object value )

Compares this instance to a specified object and returns an indication of their relative values.

  • value An object to compare, or .
  • Returns A signed integer that indicates the relative order of this instance and . Return Value Description Less than zero This instance is less than . Zero This instance is equal to . Greater than zero This instance is greater than . -or- is .

public bool Equals( byte obj )

Returns a value indicating whether this instance and a specified object represent the same value.

  • obj An object to compare to this instance.
  • Returns if is equal to this instance; otherwise, .

public bool Equals( object obj )

Returns a value indicating whether this instance is equal to a specified object.

  • obj An object to compare with this instance, or .
  • Returns if is an instance of and equals the value of this instance; otherwise, .

public static byte MaxValue

Represents the largest possible value of a . This field is constant.

public static byte MinValue

Represents the smallest possible value of a . This field is constant.

public static byte Parse( string s )

Converts the string representation of a number to its equivalent.

  • s A string that contains a number to convert. The string is interpreted using the style.
  • Returns A byte value that is equivalent to the number contained in .

public static byte Parse( string s, NumberStyles style )

Converts the string representation of a number in a specified style to its equivalent.

  • s A string that contains a number to convert. The string is interpreted using the style specified by .
  • style A bitwise combination of enumeration values that indicates the style elements that can be present in . A typical value to specify is .
  • Returns A byte value that is equivalent to the number contained in .

public static byte Parse( string s, NumberStyles style, IFormatProvider provider )

Converts the string representation of a number in a specified style and culture-specific format to its equivalent.

  • s A string that contains a number to convert. The string is interpreted using the style specified by .
  • style A bitwise combination of enumeration values that indicates the style elements that can be present in . A typical value to specify is .
  • provider An object that supplies culture-specific information about the format of . If is , the thread current culture is used.
  • Returns A byte value that is equivalent to the number contained in .

public static byte Parse( string s, IFormatProvider provider )

Converts the string representation of a number in a specified culture-specific format to its equivalent.

  • s A string that contains a number to convert. The string is interpreted using the style.
  • provider An object that supplies culture-specific parsing information about . If is , the thread current culture is used.
  • Returns A byte value that is equivalent to the number contained in .

public string ToString( IFormatProvider provider )

Converts the numeric value of the current object to its equivalent string representation using the specified culture-specific formatting information.

  • provider An object that supplies culture-specific formatting information.
  • Returns The string representation of the value of this object in the format specified by the parameter.

public string ToString( string format )

Converts the value of the current object to its equivalent string representation using the specified format.

  • format A numeric format string.
  • Returns The string representation of the current object, formatted as specified by the parameter.

public string ToString( string format, IFormatProvider provider )

Converts the value of the current object to its equivalent string representation using the specified format and culture-specific formatting information.

  • format A standard or custom numeric format string.
  • provider An object that supplies culture-specific formatting information.
  • Returns The string representation of the current object, formatted as specified by the and parameters.

public static bool TryParse( string s, ref byte result )

Tries to convert the string representation of a number to its equivalent, and returns a value that indicates whether the conversion succeeded.

  • s A string that contains a number to convert. The string is interpreted using the style.
  • result When this method returns, contains the value equivalent to the number contained in if the conversion succeeded, or zero if the conversion failed. This parameter is passed uninitialized; any value originally supplied in will be overwritten.
  • Returns if was converted successfully; otherwise, .

public static bool TryParse( string s, NumberStyles style, IFormatProvider provider, ref byte result )

Converts the string representation of a number in a specified style and culture-specific format to its equivalent. A return value indicates whether the conversion succeeded or failed.

  • s A string containing a number to convert. The string is interpreted using the style specified by .
  • style A bitwise combination of enumeration values that indicates the style elements that can be present in . A typical value to specify is .
  • provider An object that supplies culture-specific formatting information about . If is , the thread current culture is used.
  • result When this method returns, contains the 8-bit unsigned integer value equivalent to the number contained in if the conversion succeeded, or zero if the conversion failed. The conversion fails if the parameter is or , is not of the correct format, or represents a number less than or greater than . This parameter is passed uninitialized; any value originally supplied in will be overwritten.
  • Returns if was converted successfully; otherwise, .

public static int Sign( byte value )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public static byte CreateChecked( TOther value )

😔 No documentation found.

public static byte CreateSaturating( TOther value )

😔 No documentation found.

public static byte CreateTruncating( TOther value )

😔 No documentation found.

public static bool IsEvenInteger( byte value )

😔 No documentation found.

public static bool IsOddInteger( byte value )

😔 No documentation found.

public static byte Max( byte x, byte y )

😔 No documentation found.

public static byte Parse( ReadOnlySpan<char> s, IFormatProvider provider )

😔 No documentation found.

public static bool TryParse( ReadOnlySpan<char> s, IFormatProvider provider, ref byte result )

😔 No documentation found.

public static byte Min( byte x, byte y )

😔 No documentation found.

public static bool TryParse( ReadOnlySpan<byte> utf8Text, IFormatProvider provider, ref byte result )

😔 No documentation found.

public static byte Parse( ReadOnlySpan<byte> utf8Text, NumberStyles style = Integer, IFormatProvider provider = null )

😔 No documentation found.

public static bool TryParse( ReadOnlySpan<byte> utf8Text, NumberStyles style, IFormatProvider provider, ref byte result )

😔 No documentation found.

public static byte Parse( ReadOnlySpan<byte> utf8Text, IFormatProvider provider )

😔 No documentation found.

public static bool TryParse( string s, IFormatProvider provider, ref byte result )

😔 No documentation found.

public static byte PopCount( byte value )

😔 No documentation found.

public static byte TrailingZeroCount( byte value )

😔 No documentation found.

public static byte Parse( ReadOnlySpan<char> s, NumberStyles style = Integer, IFormatProvider provider = null )

😔 No documentation found.

public static bool TryParse( ReadOnlySpan<char> s, ref byte result )

😔 No documentation found.

public static bool TryParse( ReadOnlySpan<byte> utf8Text, ref byte result )

😔 No documentation found.

public static bool TryParse( ReadOnlySpan<char> s, NumberStyles style, IFormatProvider provider, ref byte result )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool TryFormat( Span<char> destination, ref int charsWritten, ReadOnlySpan<char> format = null, IFormatProvider provider = null )

😔 No documentation found.

public static byte Clamp( byte value, byte min, byte max )

😔 No documentation found.

public bool TryFormat( Span<byte> utf8Destination, ref int bytesWritten, ReadOnlySpan<char> format = null, IFormatProvider provider = null )

😔 No documentation found.

public static ValueTuple<byte,byte> DivRem( byte left, byte right )

😔 No documentation found.

public static byte LeadingZeroCount( byte value )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public static byte RotateLeft( byte value, int rotateAmount )

😔 No documentation found.

public static byte RotateRight( byte value, int rotateAmount )

😔 No documentation found.

public static bool IsPow2( byte value )

😔 No documentation found.

public TypeCode GetTypeCode( )

😔 No documentation found.

public static byte Log2( byte value )

😔 No documentation found.