SByte 结构

定义

重要

此 API 不符合 CLS。

符合 CLS 的替代方案
System.Int16

表示 8 位有符号整数。

public value class System::SByte : IComparable, IComparable<System::SByte>, IConvertible, IEquatable<System::SByte>, IFormattable
public value class System::SByte : IComparable, IComparable<System::SByte>, IConvertible, IEquatable<System::SByte>, ISpanFormattable
public value class System::SByte : IComparable<System::SByte>, IConvertible, IEquatable<System::SByte>, IParsable<System::SByte>, ISpanParsable<System::SByte>, System::Numerics::IAdditionOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IAdditiveIdentity<System::SByte, System::SByte>, System::Numerics::IBinaryInteger<System::SByte>, System::Numerics::IBinaryNumber<System::SByte>, System::Numerics::IBitwiseOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IComparisonOperators<System::SByte, System::SByte, bool>, System::Numerics::IDecrementOperators<System::SByte>, System::Numerics::IDivisionOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IEqualityOperators<System::SByte, System::SByte, bool>, System::Numerics::IIncrementOperators<System::SByte>, System::Numerics::IMinMaxValue<System::SByte>, System::Numerics::IModulusOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IMultiplicativeIdentity<System::SByte, System::SByte>, System::Numerics::IMultiplyOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::INumber<System::SByte>, System::Numerics::INumberBase<System::SByte>, System::Numerics::IShiftOperators<System::SByte, int, System::SByte>, System::Numerics::ISignedNumber<System::SByte>, System::Numerics::ISubtractionOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IUnaryNegationOperators<System::SByte, System::SByte>, System::Numerics::IUnaryPlusOperators<System::SByte, System::SByte>
public value class System::SByte : IComparable<System::SByte>, IConvertible, IEquatable<System::SByte>, IParsable<System::SByte>, ISpanParsable<System::SByte>, IUtf8SpanParsable<System::SByte>, System::Numerics::IAdditionOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IAdditiveIdentity<System::SByte, System::SByte>, System::Numerics::IBinaryInteger<System::SByte>, System::Numerics::IBinaryNumber<System::SByte>, System::Numerics::IBitwiseOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IComparisonOperators<System::SByte, System::SByte, bool>, System::Numerics::IDecrementOperators<System::SByte>, System::Numerics::IDivisionOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IEqualityOperators<System::SByte, System::SByte, bool>, System::Numerics::IIncrementOperators<System::SByte>, System::Numerics::IMinMaxValue<System::SByte>, System::Numerics::IModulusOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IMultiplicativeIdentity<System::SByte, System::SByte>, System::Numerics::IMultiplyOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::INumber<System::SByte>, System::Numerics::INumberBase<System::SByte>, System::Numerics::IShiftOperators<System::SByte, int, System::SByte>, System::Numerics::ISignedNumber<System::SByte>, System::Numerics::ISubtractionOperators<System::SByte, System::SByte, System::SByte>, System::Numerics::IUnaryNegationOperators<System::SByte, System::SByte>, System::Numerics::IUnaryPlusOperators<System::SByte, System::SByte>
public value class System::SByte : IComparable, IConvertible, IFormattable
public value class System::SByte : IComparable, IComparable<System::SByte>, IEquatable<System::SByte>, IFormattable
[System.CLSCompliant(false)]
public struct SByte : IComparable, IComparable<sbyte>, IConvertible, IEquatable<sbyte>, IFormattable
[System.CLSCompliant(false)]
public readonly struct SByte : IComparable, IComparable<sbyte>, IConvertible, IEquatable<sbyte>, IFormattable
[System.CLSCompliant(false)]
public readonly struct SByte : IComparable, IComparable<sbyte>, IConvertible, IEquatable<sbyte>, ISpanFormattable
[System.CLSCompliant(false)]
public readonly struct SByte : IComparable<sbyte>, IConvertible, IEquatable<sbyte>, IParsable<sbyte>, ISpanParsable<sbyte>, System.Numerics.IAdditionOperators<sbyte,sbyte,sbyte>, System.Numerics.IAdditiveIdentity<sbyte,sbyte>, System.Numerics.IBinaryInteger<sbyte>, System.Numerics.IBinaryNumber<sbyte>, System.Numerics.IBitwiseOperators<sbyte,sbyte,sbyte>, System.Numerics.IComparisonOperators<sbyte,sbyte,bool>, System.Numerics.IDecrementOperators<sbyte>, System.Numerics.IDivisionOperators<sbyte,sbyte,sbyte>, System.Numerics.IEqualityOperators<sbyte,sbyte,bool>, System.Numerics.IIncrementOperators<sbyte>, System.Numerics.IMinMaxValue<sbyte>, System.Numerics.IModulusOperators<sbyte,sbyte,sbyte>, System.Numerics.IMultiplicativeIdentity<sbyte,sbyte>, System.Numerics.IMultiplyOperators<sbyte,sbyte,sbyte>, System.Numerics.INumber<sbyte>, System.Numerics.INumberBase<sbyte>, System.Numerics.IShiftOperators<sbyte,int,sbyte>, System.Numerics.ISignedNumber<sbyte>, System.Numerics.ISubtractionOperators<sbyte,sbyte,sbyte>, System.Numerics.IUnaryNegationOperators<sbyte,sbyte>, System.Numerics.IUnaryPlusOperators<sbyte,sbyte>
[System.CLSCompliant(false)]
public readonly struct SByte : IComparable<sbyte>, IConvertible, IEquatable<sbyte>, IParsable<sbyte>, ISpanParsable<sbyte>, IUtf8SpanParsable<sbyte>, System.Numerics.IAdditionOperators<sbyte,sbyte,sbyte>, System.Numerics.IAdditiveIdentity<sbyte,sbyte>, System.Numerics.IBinaryInteger<sbyte>, System.Numerics.IBinaryNumber<sbyte>, System.Numerics.IBitwiseOperators<sbyte,sbyte,sbyte>, System.Numerics.IComparisonOperators<sbyte,sbyte,bool>, System.Numerics.IDecrementOperators<sbyte>, System.Numerics.IDivisionOperators<sbyte,sbyte,sbyte>, System.Numerics.IEqualityOperators<sbyte,sbyte,bool>, System.Numerics.IIncrementOperators<sbyte>, System.Numerics.IMinMaxValue<sbyte>, System.Numerics.IModulusOperators<sbyte,sbyte,sbyte>, System.Numerics.IMultiplicativeIdentity<sbyte,sbyte>, System.Numerics.IMultiplyOperators<sbyte,sbyte,sbyte>, System.Numerics.INumber<sbyte>, System.Numerics.INumberBase<sbyte>, System.Numerics.IShiftOperators<sbyte,int,sbyte>, System.Numerics.ISignedNumber<sbyte>, System.Numerics.ISubtractionOperators<sbyte,sbyte,sbyte>, System.Numerics.IUnaryNegationOperators<sbyte,sbyte>, System.Numerics.IUnaryPlusOperators<sbyte,sbyte>
[System.CLSCompliant(false)]
[System.Serializable]
public struct SByte : IComparable, IConvertible, IFormattable
[System.CLSCompliant(false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct SByte : IComparable, IComparable<sbyte>, IConvertible, IEquatable<sbyte>, IFormattable
[System.CLSCompliant(false)]
public struct SByte : IComparable, IComparable<sbyte>, IEquatable<sbyte>, IFormattable
[<System.CLSCompliant(false)>]
type sbyte = struct
    interface IConvertible
    interface IFormattable
[<System.CLSCompliant(false)>]
type sbyte = struct
    interface IConvertible
    interface ISpanFormattable
    interface IFormattable
[<System.CLSCompliant(false)>]
type sbyte = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<sbyte>
    interface ISpanFormattable
    interface ISpanParsable<sbyte>
    interface IAdditionOperators<sbyte, sbyte, sbyte>
    interface IAdditiveIdentity<sbyte, sbyte>
    interface IBinaryInteger<sbyte>
    interface IBinaryNumber<sbyte>
    interface IBitwiseOperators<sbyte, sbyte, sbyte>
    interface IComparisonOperators<sbyte, sbyte, bool>
    interface IEqualityOperators<sbyte, sbyte, bool>
    interface IDecrementOperators<sbyte>
    interface IDivisionOperators<sbyte, sbyte, sbyte>
    interface IIncrementOperators<sbyte>
    interface IModulusOperators<sbyte, sbyte, sbyte>
    interface IMultiplicativeIdentity<sbyte, sbyte>
    interface IMultiplyOperators<sbyte, sbyte, sbyte>
    interface INumber<sbyte>
    interface INumberBase<sbyte>
    interface ISubtractionOperators<sbyte, sbyte, sbyte>
    interface IUnaryNegationOperators<sbyte, sbyte>
    interface IUnaryPlusOperators<sbyte, sbyte>
    interface IShiftOperators<sbyte, int, sbyte>
    interface IMinMaxValue<sbyte>
    interface ISignedNumber<sbyte>
[<System.CLSCompliant(false)>]
type sbyte = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<sbyte>
    interface ISpanFormattable
    interface ISpanParsable<sbyte>
    interface IAdditionOperators<sbyte, sbyte, sbyte>
    interface IAdditiveIdentity<sbyte, sbyte>
    interface IBinaryInteger<sbyte>
    interface IBinaryNumber<sbyte>
    interface IBitwiseOperators<sbyte, sbyte, sbyte>
    interface IComparisonOperators<sbyte, sbyte, bool>
    interface IEqualityOperators<sbyte, sbyte, bool>
    interface IDecrementOperators<sbyte>
    interface IDivisionOperators<sbyte, sbyte, sbyte>
    interface IIncrementOperators<sbyte>
    interface IModulusOperators<sbyte, sbyte, sbyte>
    interface IMultiplicativeIdentity<sbyte, sbyte>
    interface IMultiplyOperators<sbyte, sbyte, sbyte>
    interface INumber<sbyte>
    interface INumberBase<sbyte>
    interface ISubtractionOperators<sbyte, sbyte, sbyte>
    interface IUnaryNegationOperators<sbyte, sbyte>
    interface IUnaryPlusOperators<sbyte, sbyte>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<sbyte>
    interface IShiftOperators<sbyte, int, sbyte>
    interface IMinMaxValue<sbyte>
    interface ISignedNumber<sbyte>
[<System.CLSCompliant(false)>]
type sbyte = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<sbyte>
    interface ISpanFormattable
    interface ISpanParsable<sbyte>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<sbyte>
    interface IAdditionOperators<sbyte, sbyte, sbyte>
    interface IAdditiveIdentity<sbyte, sbyte>
    interface IBinaryInteger<sbyte>
    interface IBinaryNumber<sbyte>
    interface IBitwiseOperators<sbyte, sbyte, sbyte>
    interface IComparisonOperators<sbyte, sbyte, bool>
    interface IEqualityOperators<sbyte, sbyte, bool>
    interface IDecrementOperators<sbyte>
    interface IDivisionOperators<sbyte, sbyte, sbyte>
    interface IIncrementOperators<sbyte>
    interface IModulusOperators<sbyte, sbyte, sbyte>
    interface IMultiplicativeIdentity<sbyte, sbyte>
    interface IMultiplyOperators<sbyte, sbyte, sbyte>
    interface INumber<sbyte>
    interface INumberBase<sbyte>
    interface ISubtractionOperators<sbyte, sbyte, sbyte>
    interface IUnaryNegationOperators<sbyte, sbyte>
    interface IUnaryPlusOperators<sbyte, sbyte>
    interface IShiftOperators<sbyte, int, sbyte>
    interface IMinMaxValue<sbyte>
    interface ISignedNumber<sbyte>
[<System.CLSCompliant(false)>]
[<System.Serializable>]
type sbyte = struct
    interface IFormattable
    interface IConvertible
[<System.CLSCompliant(false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type sbyte = struct
    interface IFormattable
    interface IConvertible
[<System.CLSCompliant(false)>]
type sbyte = struct
    interface IFormattable
Public Structure SByte
Implements IComparable, IComparable(Of SByte), IConvertible, IEquatable(Of SByte), IFormattable
Public Structure SByte
Implements IComparable, IComparable(Of SByte), IConvertible, IEquatable(Of SByte), ISpanFormattable
Public Structure SByte
Implements IAdditionOperators(Of SByte, SByte, SByte), IAdditiveIdentity(Of SByte, SByte), IBinaryInteger(Of SByte), IBinaryNumber(Of SByte), IBitwiseOperators(Of SByte, SByte, SByte), IComparable(Of SByte), IComparisonOperators(Of SByte, SByte, Boolean), IConvertible, IDecrementOperators(Of SByte), IDivisionOperators(Of SByte, SByte, SByte), IEqualityOperators(Of SByte, SByte, Boolean), IEquatable(Of SByte), IIncrementOperators(Of SByte), IMinMaxValue(Of SByte), IModulusOperators(Of SByte, SByte, SByte), IMultiplicativeIdentity(Of SByte, SByte), IMultiplyOperators(Of SByte, SByte, SByte), INumber(Of SByte), INumberBase(Of SByte), IParsable(Of SByte), IShiftOperators(Of SByte, Integer, SByte), ISignedNumber(Of SByte), ISpanParsable(Of SByte), ISubtractionOperators(Of SByte, SByte, SByte), IUnaryNegationOperators(Of SByte, SByte), IUnaryPlusOperators(Of SByte, SByte)
Public Structure SByte
Implements IAdditionOperators(Of SByte, SByte, SByte), IAdditiveIdentity(Of SByte, SByte), IBinaryInteger(Of SByte), IBinaryNumber(Of SByte), IBitwiseOperators(Of SByte, SByte, SByte), IComparable(Of SByte), IComparisonOperators(Of SByte, SByte, Boolean), IConvertible, IDecrementOperators(Of SByte), IDivisionOperators(Of SByte, SByte, SByte), IEqualityOperators(Of SByte, SByte, Boolean), IEquatable(Of SByte), IIncrementOperators(Of SByte), IMinMaxValue(Of SByte), IModulusOperators(Of SByte, SByte, SByte), IMultiplicativeIdentity(Of SByte, SByte), IMultiplyOperators(Of SByte, SByte, SByte), INumber(Of SByte), INumberBase(Of SByte), IParsable(Of SByte), IShiftOperators(Of SByte, Integer, SByte), ISignedNumber(Of SByte), ISpanParsable(Of SByte), ISubtractionOperators(Of SByte, SByte, SByte), IUnaryNegationOperators(Of SByte, SByte), IUnaryPlusOperators(Of SByte, SByte), IUtf8SpanParsable(Of SByte)
Public Structure SByte
Implements IComparable, IConvertible, IFormattable
Public Structure SByte
Implements IComparable, IComparable(Of SByte), IEquatable(Of SByte), IFormattable
继承
属性
实现
IComparable IComparable<SByte> IConvertible IEquatable<SByte> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<SByte> IParsable<TSelf> ISpanParsable<SByte> ISpanParsable<TSelf> IAdditionOperators<SByte,SByte,SByte> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<SByte,SByte> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<SByte> IBinaryNumber<SByte> IBinaryNumber<TSelf> IBitwiseOperators<SByte,SByte,SByte> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<SByte,SByte,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<SByte> IDecrementOperators<TSelf> IDivisionOperators<SByte,SByte,SByte> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<SByte,SByte,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<SByte> IIncrementOperators<TSelf> IMinMaxValue<SByte> IModulusOperators<SByte,SByte,SByte> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<SByte,SByte> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<SByte,SByte,SByte> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<SByte> INumber<TSelf> INumberBase<SByte> INumberBase<TSelf> IShiftOperators<SByte,Int32,SByte> IShiftOperators<TSelf,Int32,TSelf> ISignedNumber<SByte> ISubtractionOperators<SByte,SByte,SByte> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<SByte,SByte> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<SByte,SByte> IUnaryPlusOperators<TSelf,TSelf> IUtf8SpanFormattable IUtf8SpanParsable<SByte> IUtf8SpanParsable<TSelf>

注解

SByte 值类型表示从负 128 到正 127 的值的整数。

重要

SByte 类型不符合 CLS。 符合 CLS 的替代类型 Int16。 可以改用 Byte 替换从零到 MaxValue的正 SByte 值。 有关 CLS 符合性的详细信息,请参阅 语言独立性和 Language-Independent 组件

SByte 提供用于比较此类型的实例的方法,将实例的值转换为其字符串表示形式,并将数字的字符串表示形式转换为此类型的实例。

有关格式规范代码如何控制值类型的字符串表示形式的信息,请参阅 格式设置类型

字段

MaxValue

表示 SByte的最大可能值。 此字段为常量。

MinValue

表示 SByte的最小可能值。 此字段为常量。

方法

Abs(SByte)

计算值的绝对值。

Clamp(SByte, SByte, SByte)

将值固定到非独占最小值和最大值。

CompareTo(Object)

将此实例与指定的对象进行比较,并返回其相对值的指示。

CompareTo(SByte)

将此实例与指定的 8 位有符号整数进行比较,并返回其相对值的指示。

CopySign(SByte, SByte)

将值的符号复制到另一个值的符号。

CreateChecked<TOther>(TOther)

从值创建当前类型的实例,为超出当前类型的可表示范围的任何值引发溢出异常。

CreateSaturating<TOther>(TOther)

从值创建当前类型的实例,使属于当前类型的可表示范围之外的任何值饱和。

CreateTruncating<TOther>(TOther)

从值创建当前类型的实例,截断属于当前类型的可表示范围之外的任何值。

DivRem(SByte, SByte)

计算两个值的商和余数。

Equals(Object)

返回一个值,该值指示此实例是否等于指定的对象。

Equals(SByte)

返回一个值,该值指示此实例是否等于指定的 SByte 值。

GetHashCode()

返回此实例的哈希代码。

GetTypeCode()

返回值类型 SByteTypeCode

IsEvenInteger(SByte)

确定值是否表示偶数。

IsNegative(SByte)

确定值是否为负值。

IsOddInteger(SByte)

确定值是否表示奇数整数。

IsPositive(SByte)

确定值是否为正值。

IsPow2(SByte)

确定值是否为 2 的幂。

LeadingZeroCount(SByte)

计算值中的前导零数。

Log2(SByte)

计算值的 log2。

Max(SByte, SByte)

比较两个值与计算值更大。

MaxMagnitude(SByte, SByte)

比较两个值与计算值更大。

Min(SByte, SByte)

比较两个值与计算值较小。

MinMagnitude(SByte, SByte)

比较两个值与计算值较小。

Parse(ReadOnlySpan<Byte>, IFormatProvider)

将 UTF-8 字符的范围分析为值。

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

将 UTF-8 字符的范围分析为值。

Parse(ReadOnlySpan<Char>, IFormatProvider)

将字符的范围分析为值。

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

将指定样式和区域性特定格式的数字的跨度表示形式转换为其等效的 8 位带符号。

Parse(String)

将数字的字符串表示形式转换为其等效的 8 位带符号整数。

Parse(String, IFormatProvider)

将指定区域性特定格式的数字的字符串表示形式转换为等效的 8 位带符号整数。

Parse(String, NumberStyles)

将指定样式中的数字的字符串表示形式转换为其等效的 8 位带符号整数。

Parse(String, NumberStyles, IFormatProvider)

将指定样式和区域性特定格式的数字的字符串表示形式转换为其等效的 8 位带符号。

PopCount(SByte)

计算值中设置的位数。

RotateLeft(SByte, Int32)

按给定量旋转一个值。

RotateRight(SByte, Int32)

按给定的量向右旋转值。

Sign(SByte)

计算值的符号。

ToString()

将此实例的数值转换为其等效的字符串表示形式。

ToString(IFormatProvider)

使用指定的区域性特定格式信息将此实例的数值转换为其等效的字符串表示形式。

ToString(String)

使用指定的格式将此实例的数值转换为其等效的字符串表示形式。

ToString(String, IFormatProvider)

使用指定的格式和区域性特定的格式信息将此实例的数值转换为其等效的字符串表示形式。

TrailingZeroCount(SByte)

计算值中的尾随零数。

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

尝试将当前实例的值格式化为 UTF-8,并将其设置为提供的字节范围。

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

尝试将当前 8 位有符号整数实例的值格式化为提供的字符范围。

TryParse(ReadOnlySpan<Byte>, IFormatProvider, SByte)

尝试将 UTF-8 字符的范围分析为值。

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

尝试将 UTF-8 字符的范围分析为值。

TryParse(ReadOnlySpan<Byte>, SByte)

尝试将包含数字字符串表示形式的 UTF-8 字符范围转换为其等效的 8 位带符号整数。

TryParse(ReadOnlySpan<Char>, IFormatProvider, SByte)

尝试将字符范围分析为值。

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

尝试将指定样式和区域性特定格式的数字的跨度表示形式转换为其等效 SByte,并返回一个值,该值指示转换是否成功。

TryParse(ReadOnlySpan<Char>, SByte)

尝试将数字的跨度表示形式转换为其等效 SByte,并返回一个值,该值指示转换是否成功。

TryParse(String, IFormatProvider, SByte)

尝试将字符串分析为值。

TryParse(String, NumberStyles, IFormatProvider, SByte)

尝试将指定样式和区域性特定格式的数字的字符串表示形式转换为其等效 SByte,并返回一个值,该值指示转换是否成功。

TryParse(String, SByte)

尝试将数字的字符串表示形式转换为其等效 SByte,并返回一个值,该值指示转换是否成功。

显式接口实现

IAdditionOperators<SByte,SByte,SByte>.Addition(SByte, SByte)

将两个值相加以计算其总和。

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

将两个值相加以计算其总和。

IAdditiveIdentity<SByte,SByte>.AdditiveIdentity

获取当前类型的累加标识。

IBinaryInteger<SByte>.GetByteCount()

获取将作为 TryWriteLittleEndian(Span<Byte>, Int32)一部分写入的字节数。

IBinaryInteger<SByte>.GetShortestBitLength()

获取最短的两个当前值的补数表示形式的长度(以位为单位)。

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

表示 8 位有符号整数。

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

表示 8 位有符号整数。

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

尝试将当前值(采用 big-endian 格式)写入给定范围。

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

尝试将当前值(以小端格式)写入给定范围。

IBinaryNumber<SByte>.AllBitsSet

获取在其中设置所有位的二进制类型的实例。

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

计算两个值的按位和两个值。

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

计算两个值的按位或两个值。

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

计算独占值或两个值。

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

计算给定值的补补表示形式。

IComparable.CompareTo(Object)

将当前实例与同一类型的另一个对象进行比较,并返回一个整数,该整数指示当前实例在排序顺序中是否与另一个对象位于同一位置。

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

比较两个值以确定哪个值更大。

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

比较两个值以确定哪个值更大或相等。

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

比较两个值以确定哪个值更少。

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

比较两个值以确定哪个值小于或等于。

IConvertible.GetTypeCode()

返回此实例的 TypeCode

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<SByte>.CheckedDecrement(SByte)

递减值。

IDecrementOperators<SByte>.Decrement(SByte)

递减值。

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

将一个值除以计算其商。

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

比较两个值以确定相等性。

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

比较两个值以确定不相等性。

IIncrementOperators<SByte>.CheckedIncrement(SByte)

递增值。

IIncrementOperators<SByte>.Increment(SByte)

递增值。

IMinMaxValue<SByte>.MaxValue

获取当前类型的最大值。

IMinMaxValue<SByte>.MinValue

获取当前类型的最小值。

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

将两个值相除以计算其模数或余数。

IMultiplicativeIdentity<SByte,SByte>.MultiplicativeIdentity

获取当前类型的乘法标识。

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

将两个值相乘以计算其产品。

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

将两个值相乘以计算其产品。

INumber<SByte>.MaxNumber(SByte, SByte)

将两个值与计算进行比较,如果输入 NaN,则返回另一个值。

INumber<SByte>.MinNumber(SByte, SByte)

将两个值与计算进行比较,如果输入 NaN,则返回另一个值。

INumberBase<SByte>.IsCanonical(SByte)

确定某个值是否在其规范表示形式中。

INumberBase<SByte>.IsComplexNumber(SByte)

确定值是否表示复数。

INumberBase<SByte>.IsFinite(SByte)

确定值是否有限。

INumberBase<SByte>.IsImaginaryNumber(SByte)

确定值是否表示纯虚数。

INumberBase<SByte>.IsInfinity(SByte)

确定值是否无限。

INumberBase<SByte>.IsInteger(SByte)

确定值是否表示整数。

INumberBase<SByte>.IsNaN(SByte)

确定值是否为 NaN。

INumberBase<SByte>.IsNegativeInfinity(SByte)

确定值是否为负无穷大。

INumberBase<SByte>.IsNormal(SByte)

确定值是否正常。

INumberBase<SByte>.IsPositiveInfinity(SByte)

确定值是否为正无穷大。

INumberBase<SByte>.IsRealNumber(SByte)

确定值是否表示实数。

INumberBase<SByte>.IsSubnormal(SByte)

确定某个值是否为非正常值。

INumberBase<SByte>.IsZero(SByte)

确定值是否为零。

INumberBase<SByte>.MaxMagnitudeNumber(SByte, SByte)

比较两个值与计算值,如果输入 NaN,则返回另一个值。

INumberBase<SByte>.MinMagnitudeNumber(SByte, SByte)

将两个值与计算进行比较,如果输入 NaN,则返回另一个值。

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

计算 (left * right) + addend的估计值。

INumberBase<SByte>.One

获取类型 1 的值。

INumberBase<SByte>.Radix

获取类型的基数或基数。

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

表示 8 位有符号整数。

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

表示 8 位有符号整数。

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

表示 8 位有符号整数。

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

尝试将当前类型的实例转换为另一种类型,为超出当前类型可表示范围的任何值引发溢出异常。

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

尝试将当前类型的实例转换为另一种类型,使超出当前类型的可表示范围的任何值饱和。

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

尝试将当前类型的实例转换为另一种类型,截断属于当前类型的可表示范围之外的任何值。

INumberBase<SByte>.Zero

获取类型 0 的值。

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

将一个值左移一个给定的量。

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

将值右移一个给定的量。

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

将值右移一个给定的量。

ISignedNumber<SByte>.NegativeOne

获取类型 -1 的值。

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

减去两个值以计算其差异。

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

减去两个值以计算其差异。

IUnaryNegationOperators<SByte,SByte>.CheckedUnaryNegation(SByte)

计算值选中的一元求反。

IUnaryNegationOperators<SByte,SByte>.UnaryNegation(SByte)

计算值的一元求反。

IUnaryPlusOperators<SByte,SByte>.UnaryPlus(SByte)

计算一元加值。

适用于

线程安全性

此类型的所有成员都是线程安全的。 似乎修改实例状态的成员实际上返回使用新值初始化的新实例。 与任何其他类型一样,读取和写入包含此类型的实例的共享变量必须受到锁的保护,以确保线程安全。

另请参阅