struct ushort
Represents a 16-bit unsigned integer.
public int CompareTo( object value )
Compares this instance to a specified object and returns an indication of their relative values.
valueAn object to compare, or .- Returns A signed number indicating the relative values 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 int CompareTo( ushort value )
Compares this instance to a specified 16-bit unsigned integer and returns an indication of their relative values.
valueAn unsigned integer to compare.- Returns A signed number indicating the relative values 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 bool Equals( object obj )
Returns a value indicating whether this instance is equal to a specified object.
objAn object to compare to this instance.- Returns if is an instance of and equals the value of this instance; otherwise, .
public bool Equals( ushort obj )
Returns a value indicating whether this instance is equal to a specified value.
objA 16-bit unsigned integer to compare to this instance.- Returns if has the same value as this instance; otherwise, .
public static ushort MaxValue
Represents the largest possible value of . This field is constant.
public static ushort MinValue
Represents the smallest possible value of . This field is constant.
public static ushort Parse( string s )
Converts the string representation of a number to its 16-bit unsigned integer equivalent.
sA string that represents the number to convert.- Returns A 16-bit unsigned integer equivalent to the number contained in .
public static ushort Parse( string s, NumberStyles style )
Converts the string representation of a number in a specified style to its 16-bit unsigned integer equivalent. This method is not CLS-compliant. The CLS-compliant alternative is .
sA string that represents the number to convert. The string is interpreted by using the style specified by the parameter.styleA bitwise combination of the enumeration values that specify the permitted format of . A typical value to specify is .- Returns A 16-bit unsigned integer equivalent to the number specified in .
public static ushort Parse( string s, NumberStyles style, IFormatProvider provider )
Converts the string representation of a number in a specified style and culture-specific format to its 16-bit unsigned integer equivalent.
sA string that represents the number to convert. The string is interpreted by using the style specified by the parameter.styleA bitwise combination of enumeration values that indicate the style elements that can be present in . A typical value to specify is .providerAn object that supplies culture-specific formatting information about .- Returns A 16-bit unsigned integer equivalent to the number specified in .
public static ushort Parse( string s, IFormatProvider provider )
Converts the string representation of a number in a specified culture-specific format to its 16-bit unsigned integer equivalent.
sA string that represents the number to convert.providerAn object that supplies culture-specific formatting information about .- Returns A 16-bit unsigned integer equivalent to the number specified in .
public string ToString( IFormatProvider provider )
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
providerAn object that supplies culture-specific formatting information.- Returns The string representation of the value of this instance, which consists of a sequence of digits ranging from 0 to 9, without a sign or leading zeros.
public string ToString( string format )
Converts the numeric value of this instance to its equivalent string representation using the specified format.
formatA numeric format string.- Returns The string representation of the value of this instance as specified by .
public string ToString( string format, IFormatProvider provider )
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
formatA numeric format string.providerAn object that supplies culture-specific formatting information.- Returns The string representation of the value of this instance, as specified by and .
public static bool TryParse( string s, NumberStyles style, IFormatProvider provider, ref ushort result )
Tries to convert the string representation of a number in a specified style and culture-specific format to its 16-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed.
sA string that represents the number to convert. The string is interpreted by using the style specified by the parameter.styleA bitwise combination of enumeration values that indicates the permitted format of . A typical value to specify is .providerAn object that supplies culture-specific formatting information about .resultWhen this method returns, contains the 16-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 in a format compliant with , 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 bool TryParse( string s, ref ushort result )
Tries to convert the string representation of a number to its 16-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed.
sA string that represents the number to convert.resultWhen this method returns, contains the 16-bit unsigned integer value that is 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 in 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( ushort value )
😔 No documentation found.
public static ushort CreateChecked( TOther value )
😔 No documentation found.
public static ushort CreateSaturating( TOther value )
😔 No documentation found.
public static ushort CreateTruncating( TOther value )
😔 No documentation found.
public static bool IsEvenInteger( ushort value )
😔 No documentation found.
public static bool IsOddInteger( ushort value )
😔 No documentation found.
public static bool TryParse( string s, IFormatProvider provider, ref ushort result )
😔 No documentation found.
public static ushort Max( ushort x, ushort y )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<char> s, IFormatProvider provider, ref ushort result )
😔 No documentation found.
public static ushort Min( ushort x, ushort y )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<byte> utf8Text, NumberStyles style, IFormatProvider provider, ref ushort result )
😔 No documentation found.
public static ushort Parse( ReadOnlySpan<byte> utf8Text, IFormatProvider provider )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<byte> utf8Text, IFormatProvider provider, ref ushort result )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public static ushort Parse( ReadOnlySpan<char> s, IFormatProvider provider )
😔 No documentation found.
public static ushort Parse( ReadOnlySpan<byte> utf8Text, NumberStyles style = Integer, IFormatProvider provider = null )
😔 No documentation found.
public static ushort PopCount( ushort value )
😔 No documentation found.
public static ushort TrailingZeroCount( ushort value )
😔 No documentation found.
public bool TryFormat( Span<char> destination, ref int charsWritten, ReadOnlySpan<char> format = null, IFormatProvider provider = null )
😔 No documentation found.
public bool TryFormat( Span<byte> utf8Destination, ref int bytesWritten, ReadOnlySpan<char> format = null, IFormatProvider provider = null )
😔 No documentation found.
public static ushort Parse( ReadOnlySpan<char> s, NumberStyles style = Integer, IFormatProvider provider = null )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<char> s, ref ushort result )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<byte> utf8Text, ref ushort result )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<char> s, NumberStyles style, IFormatProvider provider, ref ushort result )
😔 No documentation found.
public static ushort Clamp( ushort value, ushort min, ushort max )
😔 No documentation found.
public TypeCode GetTypeCode( )
😔 No documentation found.
public static ushort LeadingZeroCount( ushort value )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public static ushort RotateLeft( ushort value, int rotateAmount )
😔 No documentation found.
public static ushort RotateRight( ushort value, int rotateAmount )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public static bool IsPow2( ushort value )
😔 No documentation found.
public static ValueTuple<ushort,ushort> DivRem( ushort left, ushort right )
😔 No documentation found.
public static ushort Log2( ushort value )
😔 No documentation found.