SByte Struktura
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Důležité
Toto rozhraní API neodpovídá specifikaci CLS.
- Alternativa odpovídající specifikaci CLS
- System.Int16
Představuje 8bitové celé číslo podepsaného.
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 : IAdditionOperators<System::SByte, System::SByte, System::SByte>, IAdditiveIdentity<System::SByte, System::SByte>, IBinaryInteger<System::SByte>, IBinaryNumber<System::SByte>, IBitwiseOperators<System::SByte, System::SByte, System::SByte>, IComparable<System::SByte>, IComparisonOperators<System::SByte, System::SByte>, IConvertible, IDecrementOperators<System::SByte>, IDivisionOperators<System::SByte, System::SByte, System::SByte>, IEqualityOperators<System::SByte, System::SByte>, IEquatable<System::SByte>, IIncrementOperators<System::SByte>, IMinMaxValue<System::SByte>, IModulusOperators<System::SByte, System::SByte, System::SByte>, IMultiplicativeIdentity<System::SByte, System::SByte>, IMultiplyOperators<System::SByte, System::SByte, System::SByte>, INumber<System::SByte>, IParseable<System::SByte>, IShiftOperators<System::SByte, System::SByte>, ISignedNumber<System::SByte>, ISpanParseable<System::SByte>, ISubtractionOperators<System::SByte, System::SByte, System::SByte>, IUnaryNegationOperators<System::SByte, System::SByte>, 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 : IAdditionOperators<sbyte,sbyte,sbyte>, IAdditiveIdentity<sbyte,sbyte>, IBinaryInteger<sbyte>, IBinaryNumber<sbyte>, IBitwiseOperators<sbyte,sbyte,sbyte>, IComparable<sbyte>, IComparisonOperators<sbyte,sbyte>, IConvertible, IDecrementOperators<sbyte>, IDivisionOperators<sbyte,sbyte,sbyte>, IEqualityOperators<sbyte,sbyte>, IEquatable<sbyte>, IIncrementOperators<sbyte>, IMinMaxValue<sbyte>, IModulusOperators<sbyte,sbyte,sbyte>, IMultiplicativeIdentity<sbyte,sbyte>, IMultiplyOperators<sbyte,sbyte,sbyte>, INumber<sbyte>, IParseable<sbyte>, IShiftOperators<sbyte,sbyte>, ISignedNumber<sbyte>, ISpanParseable<sbyte>, ISubtractionOperators<sbyte,sbyte,sbyte>, IUnaryNegationOperators<sbyte,sbyte>, 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 ISpanFormattable
interface IFormattable
interface IBinaryInteger<sbyte>
interface IBinaryNumber<sbyte>
interface IBitwiseOperators<sbyte, sbyte, sbyte>
interface INumber<sbyte>
interface IAdditionOperators<sbyte, sbyte, sbyte>
interface IAdditiveIdentity<sbyte, sbyte>
interface IComparisonOperators<sbyte, sbyte>
interface IEqualityOperators<sbyte, sbyte>
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 IParseable<sbyte>
interface ISpanParseable<sbyte>
interface ISubtractionOperators<sbyte, sbyte, sbyte>
interface IUnaryNegationOperators<sbyte, sbyte>
interface IUnaryPlusOperators<sbyte, sbyte>
interface IShiftOperators<sbyte, 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), IConvertible, IDecrementOperators(Of SByte), IDivisionOperators(Of SByte, SByte, SByte), IEqualityOperators(Of SByte, SByte), 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), IParseable(Of SByte), IShiftOperators(Of SByte, SByte), ISignedNumber(Of SByte), ISpanParseable(Of SByte), ISubtractionOperators(Of SByte, SByte, SByte), IUnaryNegationOperators(Of SByte, SByte), IUnaryPlusOperators(Of SByte, SByte)
Public Structure SByte
Implements IComparable, IConvertible, IFormattable
Public Structure SByte
Implements IComparable, IComparable(Of SByte), IEquatable(Of SByte), IFormattable
- Dědičnost
- Atributy
- Implementuje
-
IComparable IComparable<SByte> IConvertible IEquatable<SByte> IFormattable ISpanFormattable 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> IComparable<TOther> IComparable<TSelf> IComparisonOperators<SByte,SByte> IComparisonOperators<TSelf,TSelf> IDecrementOperators<SByte> IDecrementOperators<TSelf> IDivisionOperators<SByte,SByte,SByte> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<SByte,SByte> IEqualityOperators<TSelf,TOther> IEqualityOperators<TSelf,TSelf> IEquatable<TOther> IEquatable<TSelf> 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> IParseable<SByte> IParseable<TSelf> IShiftOperators<SByte,SByte> IShiftOperators<TSelf,TSelf> ISignedNumber<SByte> ISpanParseable<SByte> ISpanParseable<TSelf> ISubtractionOperators<SByte,SByte,SByte> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<SByte,SByte> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<SByte,SByte> IUnaryPlusOperators<TSelf,TSelf>
Poznámky
Typ SByte hodnoty představuje celá čísla s hodnotami od záporných 128 po kladná 127.
Důležité
Typ SByte není kompatibilní se specifikací CLS. Alternativní typ kompatibilní s CLS je Int16. Byte místo toho lze použít k nahrazení kladné SByte hodnoty, která se pohybuje od nuly do MaxValue. Další informace o dodržování předpisů CLS najdete v tématu Language Independence and Language-Independent Components.
SByte poskytuje metody pro porovnání instancí tohoto typu, převod hodnoty instance na jeho řetězcové reprezentace a převod řetězcové reprezentace čísla na instanci tohoto typu.
Informace o tom, jak kódy specifikace formátu řídí řetězcovou reprezentaci typů hodnot, naleznete v tématu Typy formátování.
Pole
MaxValue |
Představuje největší možnou SBytehodnotu . Toto pole je konstantní. |
MinValue |
Představuje nejmenší možnou hodnotu .SByte Toto pole je konstantní. |
Metody
CompareTo(Object) |
Porovná tuto instanci se zadaným objektem a vrací údaj o jejich relativních hodnotách. |
CompareTo(SByte) |
Porovná tuto instanci se zadaným 8bitovým znaménkem a vrátí indikaci jejich relativních hodnot. |
Equals(Object) |
Vrací hodnotu, která určuje, zda je tato instance rovna zadanému objektu. |
Equals(SByte) |
Vrátí hodnotu označující, jestli se tato instance rovná zadané SByte hodnotě. |
GetHashCode() |
Vrátí hodnotu hash pro tuto instanci. |
GetTypeCode() | |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Převede reprezentaci čísla, které je v zadaném stylu a formátu specifické pro jazykovou verzi, na jeho 8bitový ekvivalent podepsaného. |
Parse(String) |
Převádí řetězcové vyjádření čísla na jeho ekvivalent v podobě 8bitového celého čísla se znaménkem. |
Parse(String, IFormatProvider) |
Převede řetězcovou reprezentaci čísla v zadaném formátu specifickém pro jazykovou verzi na jeho 8bitový ekvivalent celého čísla. |
Parse(String, NumberStyles) |
Převede řetězcovou reprezentaci čísla v zadaném stylu na jeho 8bitový ekvivalent integeru. |
Parse(String, NumberStyles, IFormatProvider) |
Převede řetězcovou reprezentaci čísla, která je v zadaném stylu a formátu specifickém pro jazykovou verzi, na jeho 8bitový ekvivalent podepsaného. |
ToString() |
Převádí číselnou hodnotu této instance na její ekvivalentní řetězcové vyjádření. |
ToString(IFormatProvider) |
Převádí číselnou hodnotu této instance na její ekvivalentní řetězcové vyjádření pomocí určených informací o formátování specifických pro jazykovou verzi. |
ToString(String) |
Převádí číselnou hodnotu této instance na její ekvivalentní řetězcové vyjádření pomocí určeného formátu. |
ToString(String, IFormatProvider) |
Převádí číselnou hodnotu této instance na její ekvivalentní řetězcové vyjádření pomocí určeného formátu a informací o formátování specifických pro jazykovou verzi. |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Pokusí se naformátovat hodnotu aktuální 8bitové znaménka celé číslo do zadaného rozsahu znaků. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, SByte) |
Pokusí se převést reprezentaci čísla v zadaném stylu a formátu specifickém pro jazykovou verzi na jeho SByte ekvivalent a vrátí hodnotu, která označuje, zda převod proběhl úspěšně. |
TryParse(ReadOnlySpan<Char>, SByte) |
Pokusí se převést reprezentaci čísla na ekvivalent SByte a vrátí hodnotu, která označuje, zda převod proběhl úspěšně. |
TryParse(String, NumberStyles, IFormatProvider, SByte) |
Pokusí se převést řetězcové vyjádření čísla v zadaném stylu a formátu specifickém pro jazykovou verzi na jeho SByte ekvivalent a vrátí hodnotu, která označuje, zda převod byl úspěšný. |
TryParse(String, SByte) |
Pokusí se převést řetězcovou reprezentaci čísla na jeho SByte ekvivalent a vrátí hodnotu, která označuje, zda převod byl úspěšný. |
Explicitní implementace rozhraní
Platí pro
Bezpečný přístup z více vláken
Všechny členy tohoto typu jsou zabezpečeny pro přístup z více vláken. Členy, které patrně upravují stav instance, ve skutečnosti vrací novou instanci inicializovanou s použitím nové hodnoty. Jako u jakéhokoli typu, čtení a zápis do sdílené proměnné, která obsahuje instanci tohoto typu, musí být chráněn zámkem, který zaručí bezpečný přístup z více vláken.