Decimal Estrutura

Definição

Representa um número de ponto flutuante decimal.

public value class System::Decimal : IComparable, IComparable<System::Decimal>, IConvertible, IEquatable<System::Decimal>, IFormattable
public value class System::Decimal : IComparable, IComparable<System::Decimal>, IConvertible, IEquatable<System::Decimal>, IFormattable, System::Runtime::Serialization::IDeserializationCallback, System::Runtime::Serialization::ISerializable
public value class System::Decimal : IComparable, IComparable<System::Decimal>, IConvertible, IEquatable<System::Decimal>, ISpanFormattable, System::Runtime::Serialization::IDeserializationCallback, System::Runtime::Serialization::ISerializable
public value class System::Decimal : IComparable<System::Decimal>, IConvertible, IEquatable<System::Decimal>, IParsable<System::Decimal>, ISpanParsable<System::Decimal>, System::Numerics::IAdditionOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IAdditiveIdentity<System::Decimal, System::Decimal>, System::Numerics::IComparisonOperators<System::Decimal, System::Decimal, bool>, System::Numerics::IDecrementOperators<System::Decimal>, System::Numerics::IDivisionOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IEqualityOperators<System::Decimal, System::Decimal, bool>, System::Numerics::IFloatingPoint<System::Decimal>, System::Numerics::IFloatingPointConstants<System::Decimal>, System::Numerics::IIncrementOperators<System::Decimal>, System::Numerics::IMinMaxValue<System::Decimal>, System::Numerics::IModulusOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IMultiplicativeIdentity<System::Decimal, System::Decimal>, System::Numerics::IMultiplyOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::INumber<System::Decimal>, System::Numerics::INumberBase<System::Decimal>, System::Numerics::ISignedNumber<System::Decimal>, System::Numerics::ISubtractionOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IUnaryNegationOperators<System::Decimal, System::Decimal>, System::Numerics::IUnaryPlusOperators<System::Decimal, System::Decimal>, System::Runtime::Serialization::IDeserializationCallback, System::Runtime::Serialization::ISerializable
public value class System::Decimal : IComparable<System::Decimal>, IConvertible, IEquatable<System::Decimal>, IParsable<System::Decimal>, ISpanParsable<System::Decimal>, IUtf8SpanParsable<System::Decimal>, System::Numerics::IAdditionOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IAdditiveIdentity<System::Decimal, System::Decimal>, System::Numerics::IComparisonOperators<System::Decimal, System::Decimal, bool>, System::Numerics::IDecrementOperators<System::Decimal>, System::Numerics::IDivisionOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IEqualityOperators<System::Decimal, System::Decimal, bool>, System::Numerics::IFloatingPoint<System::Decimal>, System::Numerics::IFloatingPointConstants<System::Decimal>, System::Numerics::IIncrementOperators<System::Decimal>, System::Numerics::IMinMaxValue<System::Decimal>, System::Numerics::IModulusOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IMultiplicativeIdentity<System::Decimal, System::Decimal>, System::Numerics::IMultiplyOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::INumber<System::Decimal>, System::Numerics::INumberBase<System::Decimal>, System::Numerics::ISignedNumber<System::Decimal>, System::Numerics::ISubtractionOperators<System::Decimal, System::Decimal, System::Decimal>, System::Numerics::IUnaryNegationOperators<System::Decimal, System::Decimal>, System::Numerics::IUnaryPlusOperators<System::Decimal, System::Decimal>, System::Runtime::Serialization::IDeserializationCallback, System::Runtime::Serialization::ISerializable
public value class System::Decimal : IComparable, IComparable<System::Decimal>, IConvertible, IEquatable<System::Decimal>, IFormattable, System::Runtime::Serialization::IDeserializationCallback
public value class System::Decimal : IComparable, IConvertible, IFormattable
public value class System::Decimal : IComparable, IComparable<System::Decimal>, IEquatable<System::Decimal>, IFormattable
public struct Decimal : IComparable, IComparable<decimal>, IConvertible, IEquatable<decimal>, IFormattable
public readonly struct Decimal : IComparable, IComparable<decimal>, IConvertible, IEquatable<decimal>, IFormattable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
public readonly struct Decimal : IComparable, IComparable<decimal>, IConvertible, IEquatable<decimal>, ISpanFormattable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
public readonly struct Decimal : IComparable<decimal>, IConvertible, IEquatable<decimal>, IParsable<decimal>, ISpanParsable<decimal>, System.Numerics.IAdditionOperators<decimal,decimal,decimal>, System.Numerics.IAdditiveIdentity<decimal,decimal>, System.Numerics.IComparisonOperators<decimal,decimal,bool>, System.Numerics.IDecrementOperators<decimal>, System.Numerics.IDivisionOperators<decimal,decimal,decimal>, System.Numerics.IEqualityOperators<decimal,decimal,bool>, System.Numerics.IFloatingPoint<decimal>, System.Numerics.IFloatingPointConstants<decimal>, System.Numerics.IIncrementOperators<decimal>, System.Numerics.IMinMaxValue<decimal>, System.Numerics.IModulusOperators<decimal,decimal,decimal>, System.Numerics.IMultiplicativeIdentity<decimal,decimal>, System.Numerics.IMultiplyOperators<decimal,decimal,decimal>, System.Numerics.INumber<decimal>, System.Numerics.INumberBase<decimal>, System.Numerics.ISignedNumber<decimal>, System.Numerics.ISubtractionOperators<decimal,decimal,decimal>, System.Numerics.IUnaryNegationOperators<decimal,decimal>, System.Numerics.IUnaryPlusOperators<decimal,decimal>, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
public readonly struct Decimal : IComparable<decimal>, IConvertible, IEquatable<decimal>, IParsable<decimal>, ISpanParsable<decimal>, IUtf8SpanParsable<decimal>, System.Numerics.IAdditionOperators<decimal,decimal,decimal>, System.Numerics.IAdditiveIdentity<decimal,decimal>, System.Numerics.IComparisonOperators<decimal,decimal,bool>, System.Numerics.IDecrementOperators<decimal>, System.Numerics.IDivisionOperators<decimal,decimal,decimal>, System.Numerics.IEqualityOperators<decimal,decimal,bool>, System.Numerics.IFloatingPoint<decimal>, System.Numerics.IFloatingPointConstants<decimal>, System.Numerics.IIncrementOperators<decimal>, System.Numerics.IMinMaxValue<decimal>, System.Numerics.IModulusOperators<decimal,decimal,decimal>, System.Numerics.IMultiplicativeIdentity<decimal,decimal>, System.Numerics.IMultiplyOperators<decimal,decimal,decimal>, System.Numerics.INumber<decimal>, System.Numerics.INumberBase<decimal>, System.Numerics.ISignedNumber<decimal>, System.Numerics.ISubtractionOperators<decimal,decimal,decimal>, System.Numerics.IUnaryNegationOperators<decimal,decimal>, System.Numerics.IUnaryPlusOperators<decimal,decimal>, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
public struct Decimal : IComparable, IComparable<decimal>, IConvertible, IEquatable<decimal>, IFormattable, System.Runtime.Serialization.IDeserializationCallback
public readonly struct Decimal : IComparable, IComparable<decimal>, IConvertible, IEquatable<decimal>, IFormattable, System.Runtime.Serialization.IDeserializationCallback
[System.Serializable]
public struct Decimal : IComparable, IConvertible, IFormattable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct Decimal : IComparable, IComparable<decimal>, IConvertible, IEquatable<decimal>, IFormattable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct Decimal : IComparable, IComparable<decimal>, IConvertible, IEquatable<decimal>, IFormattable, System.Runtime.Serialization.IDeserializationCallback
public struct Decimal : IComparable, IComparable<decimal>, IEquatable<decimal>, IFormattable
type decimal = struct
    interface IConvertible
    interface IFormattable
type decimal = struct
    interface IConvertible
    interface IFormattable
    interface IDeserializationCallback
    interface ISerializable
type decimal = struct
    interface IConvertible
    interface ISpanFormattable
    interface IFormattable
    interface IDeserializationCallback
    interface ISerializable
type decimal = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<decimal>
    interface ISpanFormattable
    interface ISpanParsable<decimal>
    interface IAdditionOperators<decimal, decimal, decimal>
    interface IAdditiveIdentity<decimal, decimal>
    interface IComparisonOperators<decimal, decimal, bool>
    interface IEqualityOperators<decimal, decimal, bool>
    interface IDecrementOperators<decimal>
    interface IDivisionOperators<decimal, decimal, decimal>
    interface IFloatingPoint<decimal>
    interface IFloatingPointConstants<decimal>
    interface INumberBase<decimal>
    interface IIncrementOperators<decimal>
    interface IMultiplicativeIdentity<decimal, decimal>
    interface IMultiplyOperators<decimal, decimal, decimal>
    interface ISubtractionOperators<decimal, decimal, decimal>
    interface IUnaryNegationOperators<decimal, decimal>
    interface IUnaryPlusOperators<decimal, decimal>
    interface IModulusOperators<decimal, decimal, decimal>
    interface INumber<decimal>
    interface ISignedNumber<decimal>
    interface IMinMaxValue<decimal>
    interface IDeserializationCallback
    interface ISerializable
type decimal = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<decimal>
    interface ISpanFormattable
    interface ISpanParsable<decimal>
    interface IAdditionOperators<decimal, decimal, decimal>
    interface IAdditiveIdentity<decimal, decimal>
    interface IComparisonOperators<decimal, decimal, bool>
    interface IEqualityOperators<decimal, decimal, bool>
    interface IDecrementOperators<decimal>
    interface IDivisionOperators<decimal, decimal, decimal>
    interface IFloatingPoint<decimal>
    interface IFloatingPointConstants<decimal>
    interface INumberBase<decimal>
    interface IIncrementOperators<decimal>
    interface IMultiplicativeIdentity<decimal, decimal>
    interface IMultiplyOperators<decimal, decimal, decimal>
    interface ISubtractionOperators<decimal, decimal, decimal>
    interface IUnaryNegationOperators<decimal, decimal>
    interface IUnaryPlusOperators<decimal, decimal>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<decimal>
    interface IModulusOperators<decimal, decimal, decimal>
    interface INumber<decimal>
    interface ISignedNumber<decimal>
    interface IMinMaxValue<decimal>
    interface IDeserializationCallback
    interface ISerializable
type decimal = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<decimal>
    interface ISpanFormattable
    interface ISpanParsable<decimal>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<decimal>
    interface IAdditionOperators<decimal, decimal, decimal>
    interface IAdditiveIdentity<decimal, decimal>
    interface IComparisonOperators<decimal, decimal, bool>
    interface IEqualityOperators<decimal, decimal, bool>
    interface IDecrementOperators<decimal>
    interface IDivisionOperators<decimal, decimal, decimal>
    interface IFloatingPoint<decimal>
    interface IFloatingPointConstants<decimal>
    interface IIncrementOperators<decimal>
    interface IMultiplicativeIdentity<decimal, decimal>
    interface IMultiplyOperators<decimal, decimal, decimal>
    interface INumberBase<decimal>
    interface ISubtractionOperators<decimal, decimal, decimal>
    interface IUnaryNegationOperators<decimal, decimal>
    interface IUnaryPlusOperators<decimal, decimal>
    interface IModulusOperators<decimal, decimal, decimal>
    interface INumber<decimal>
    interface ISignedNumber<decimal>
    interface IMinMaxValue<decimal>
    interface IDeserializationCallback
    interface ISerializable
type decimal = struct
    interface IConvertible
    interface IFormattable
    interface IDeserializationCallback
[<System.Serializable>]
type decimal = struct
    interface IFormattable
    interface IConvertible
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type decimal = struct
    interface IFormattable
    interface IConvertible
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type decimal = struct
    interface IFormattable
    interface IConvertible
    interface IDeserializationCallback
type decimal = struct
    interface IFormattable
Public Structure Decimal
Implements IComparable, IComparable(Of Decimal), IConvertible, IEquatable(Of Decimal), IFormattable
Public Structure Decimal
Implements IComparable, IComparable(Of Decimal), IConvertible, IDeserializationCallback, IEquatable(Of Decimal), IFormattable, ISerializable
Public Structure Decimal
Implements IComparable, IComparable(Of Decimal), IConvertible, IDeserializationCallback, IEquatable(Of Decimal), ISerializable, ISpanFormattable
Public Structure Decimal
Implements IAdditionOperators(Of Decimal, Decimal, Decimal), IAdditiveIdentity(Of Decimal, Decimal), IComparable(Of Decimal), IComparisonOperators(Of Decimal, Decimal, Boolean), IConvertible, IDecrementOperators(Of Decimal), IDeserializationCallback, IDivisionOperators(Of Decimal, Decimal, Decimal), IEqualityOperators(Of Decimal, Decimal, Boolean), IEquatable(Of Decimal), IFloatingPoint(Of Decimal), IFloatingPointConstants(Of Decimal), IIncrementOperators(Of Decimal), IMinMaxValue(Of Decimal), IModulusOperators(Of Decimal, Decimal, Decimal), IMultiplicativeIdentity(Of Decimal, Decimal), IMultiplyOperators(Of Decimal, Decimal, Decimal), INumber(Of Decimal), INumberBase(Of Decimal), IParsable(Of Decimal), ISerializable, ISignedNumber(Of Decimal), ISpanParsable(Of Decimal), ISubtractionOperators(Of Decimal, Decimal, Decimal), IUnaryNegationOperators(Of Decimal, Decimal), IUnaryPlusOperators(Of Decimal, Decimal)
Public Structure Decimal
Implements IAdditionOperators(Of Decimal, Decimal, Decimal), IAdditiveIdentity(Of Decimal, Decimal), IComparable(Of Decimal), IComparisonOperators(Of Decimal, Decimal, Boolean), IConvertible, IDecrementOperators(Of Decimal), IDeserializationCallback, IDivisionOperators(Of Decimal, Decimal, Decimal), IEqualityOperators(Of Decimal, Decimal, Boolean), IEquatable(Of Decimal), IFloatingPoint(Of Decimal), IFloatingPointConstants(Of Decimal), IIncrementOperators(Of Decimal), IMinMaxValue(Of Decimal), IModulusOperators(Of Decimal, Decimal, Decimal), IMultiplicativeIdentity(Of Decimal, Decimal), IMultiplyOperators(Of Decimal, Decimal, Decimal), INumber(Of Decimal), INumberBase(Of Decimal), IParsable(Of Decimal), ISerializable, ISignedNumber(Of Decimal), ISpanParsable(Of Decimal), ISubtractionOperators(Of Decimal, Decimal, Decimal), IUnaryNegationOperators(Of Decimal, Decimal), IUnaryPlusOperators(Of Decimal, Decimal), IUtf8SpanParsable(Of Decimal)
Public Structure Decimal
Implements IComparable, IComparable(Of Decimal), IConvertible, IDeserializationCallback, IEquatable(Of Decimal), IFormattable
Public Structure Decimal
Implements IComparable, IConvertible, IFormattable
Public Structure Decimal
Implements IComparable, IComparable(Of Decimal), IEquatable(Of Decimal), IFormattable
Herança
Decimal
Atributos
Implementações
IComparable IComparable<Decimal> IConvertible IEquatable<Decimal> IFormattable IDeserializationCallback ISerializable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<Decimal> IParsable<TSelf> ISpanParsable<Decimal> ISpanParsable<TSelf> IAdditionOperators<Decimal,Decimal,Decimal> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<Decimal,Decimal> IAdditiveIdentity<TSelf,TSelf> IComparisonOperators<Decimal,Decimal,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<Decimal> IDecrementOperators<TSelf> IDivisionOperators<Decimal,Decimal,Decimal> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<Decimal,Decimal,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IFloatingPoint<Decimal> IFloatingPointConstants<Decimal> IFloatingPointConstants<TSelf> IIncrementOperators<Decimal> IIncrementOperators<TSelf> IMinMaxValue<Decimal> IModulusOperators<Decimal,Decimal,Decimal> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<Decimal,Decimal> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<Decimal,Decimal,Decimal> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<Decimal> INumber<TSelf> INumberBase<Decimal> INumberBase<TSelf> ISignedNumber<Decimal> ISignedNumber<TSelf> ISubtractionOperators<Decimal,Decimal,Decimal> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<Decimal,Decimal> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<Decimal,Decimal> IUnaryPlusOperators<TSelf,TSelf> IUtf8SpanFormattable IUtf8SpanParsable<Decimal> IUtf8SpanParsable<TSelf>

Comentários

Para obter mais informações sobre essa API, consulte Comentários da API complementar para Decimal.

Construtores

Decimal(Double)

Inicializa uma nova instância de Decimal para o valor do número de ponto flutuante especificado de precisão dupla.

Decimal(Int32)

Inicializa uma nova instância de Decimal para o valor inteiro com sinal de 32 bits especificado.

Decimal(Int32, Int32, Int32, Boolean, Byte)

Inicializa uma nova instância de Decimal de parâmetros que especificam as partes constituintes da instância.

Decimal(Int32[])

Inicializa uma nova instância de Decimal para um valor decimal representado no binário e contido em uma matriz especificada.

Decimal(Int64)

Inicializa uma nova instância de Decimal para o valor inteiro com sinal de 64 bits especificado.

Decimal(ReadOnlySpan<Int32>)

Inicializa uma nova instância de Decimal para um valor decimal representado em binário e contido no intervalo especificado.

Decimal(Single)

Inicializa uma nova instância de Decimal para o valor do número de ponto flutuante especificado de precisão simples.

Decimal(UInt32)

Inicializa uma nova instância de Decimal para o valor inteiro sem sinal de 32 bits especificado.

Decimal(UInt64)

Inicializa uma nova instância de Decimal para o valor inteiro sem sinal de 64 bits especificado.

Campos

MaxValue

Representa o maior valor possível de Decimal. Este campo é constante e somente leitura.

MinusOne

Representa o número um negativo (-1).

MinValue

Representa o menor valor possível de Decimal. Este campo é constante e somente leitura.

One

Representa o número um (1).

Zero

Representa o número zero (0).

Propriedades

Scale

Obtém o fator de dimensionamento do decimal, que é um número de 0 a 28 que representa o número de dígitos decimais.

Métodos

Abs(Decimal)

Calcula o absoluto de um valor.

Add(Decimal, Decimal)

Soma dois valores Decimal especificados.

Ceiling(Decimal)

Retorna o menor valor integral maior ou igual ao número decimal especificado.

Clamp(Decimal, Decimal, Decimal)

Fixa um valor a um valor mínimo e máximo inclusivo.

Compare(Decimal, Decimal)

Compara dois valores Decimal especificados.

CompareTo(Decimal)

Compara essa instância com um objeto Decimal especificado e retorna uma comparação dos valores relativos.

CompareTo(Object)

Compara essa instância com um objeto especificado e retorna uma comparação dos valores relativos.

CopySign(Decimal, Decimal)

Copia o sinal de um valor para o sinal de outro valor.

CreateChecked<TOther>(TOther)

Cria uma instância do tipo atual de um valor, gerando uma exceção de estouro para quaisquer valores que estejam fora do intervalo representável do tipo atual.

CreateSaturating<TOther>(TOther)

Cria uma instância do tipo atual de um valor, saturando todos os valores que estão fora do intervalo representável do tipo atual.

CreateTruncating<TOther>(TOther)

Cria uma instância do tipo atual de um valor, truncando todos os valores que estão fora do intervalo representável do tipo atual.

Divide(Decimal, Decimal)

Divide dois valores Decimal especificados.

Equals(Decimal)

Retorna um valor que indica se essa instância e um objeto Decimal especificado representam o mesmo valor.

Equals(Decimal, Decimal)

Retorna um valor que indica se duas instâncias especificadas de Decimal representam o mesmo valor.

Equals(Object)

Retorna um valor que indica se essa instância e um Object especificado representam o mesmo tipo de valor.

Floor(Decimal)

Arredonda um número Decimal especificado para o inteiro mais próximo do infinito negativo.

FromOACurrency(Int64)

Converte inteiro com sinal de 64 bits, que contém um valor de moeda de Automação de OLE, no valor Decimal equivalente.

GetBits(Decimal)

Converte o valor da instância especificada de Decimal para sua representação de cadeia de caracteres equivalente.

GetBits(Decimal, Span<Int32>)

Converte o valor da instância especificada de Decimal para sua representação de cadeia de caracteres equivalente.

GetHashCode()

Retorna o código hash para a instância.

GetTypeCode()

Retorna o TypeCode para tipo de valor Decimal.

IsCanonical(Decimal)

Determina se um valor está em sua representação canônica.

IsEvenInteger(Decimal)

Determina se um valor representa um número integral par.

IsInteger(Decimal)

Determina se um valor representa um número integral.

IsNegative(Decimal)

Determina se um valor é negativo.

IsOddInteger(Decimal)

Determina se um valor representa um número integral ímpar.

IsPositive(Decimal)

Determina se um valor é positivo.

Max(Decimal, Decimal)

Compara dois valores com a computação, que é maior.

MaxMagnitude(Decimal, Decimal)

Compara dois valores com a computação, que é maior.

Min(Decimal, Decimal)

Compara dois valores com a computação que é menor.

MinMagnitude(Decimal, Decimal)

Compara dois valores com a computação que é menor.

Multiply(Decimal, Decimal)

Multiplica dois valores Decimal especificados.

Negate(Decimal)

Retorna o resultado da multiplicação do valor Decimal especificado pelo negativo.

Parse(ReadOnlySpan<Byte>, IFormatProvider)

Analisa um intervalo de caracteres UTF-8 em um valor.

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

Analisa um intervalo de caracteres UTF-8 em um valor.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Analisa um intervalo de caracteres em um valor.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Converte a representação de intervalo de um número em seu equivalente de Decimal usando o formato específico da cultura e estilo especificados.

Parse(String)

Converte a representação da cadeia de caracteres de um número no Decimal equivalente.

Parse(String, IFormatProvider)

Converte a representação de cadeia de caracteres de um número no equivalente de Decimal usando as informações de formato específicas da cultura especificadas.

Parse(String, NumberStyles)

Converte a representação de cadeia de caracteres de um número em um estilo especificado em seu Decimal equivalente.

Parse(String, NumberStyles, IFormatProvider)

Converte a representação de cadeia de caracteres de um número em seu Decimal equivalente usando o formato específico da cultura e estilo especificados.

Remainder(Decimal, Decimal)

Calcula o resto após dividir dois valores Decimal.

Round(Decimal)

Arredonda um valor decimal para o inteiro mais próximo.

Round(Decimal, Int32)

Arredonda um valor Decimal para um número especificado de casas decimais.

Round(Decimal, Int32, MidpointRounding)

Arredonda um valor decimal para a precisão especificada usando a estratégia de arredondamento especificada.

Round(Decimal, MidpointRounding)

Arredonda um valor decimal para um inteiro usando a estratégia de arredondamento especificada.

Sign(Decimal)

Calcula o sinal de um valor.

Subtract(Decimal, Decimal)

Subtrai um valor Decimal especificado de outro.

ToByte(Decimal)

Converte o valor do Decimal especificado no inteiro sem sinal de 8 bits equivalente.

ToDouble(Decimal)

Converte o valor do Decimal especificado no número de ponto flutuante de precisão dupla equivalente.

ToInt16(Decimal)

Converte o valor do Decimal especificado no inteiro com sinal de 16 bits equivalente.

ToInt32(Decimal)

Converte o valor do Decimal especificado para o inteiro com sinal de 32 bits equivalente.

ToInt64(Decimal)

Converte o valor do Decimal especificado no inteiro com sinal de 64 bits equivalente.

ToOACurrency(Decimal)

Converte o valor Decimal especificado no valor de moeda de Automação OLE equivalente, que é contido em um inteiro com sinal de 64 bits.

ToSByte(Decimal)

Converte o valor do Decimal especificado no inteiro com sinal de 8 bits equivalente.

ToSingle(Decimal)

Converte o valor do Decimal especificado no número de ponto flutuante de precisão simples equivalente.

ToString()

Converte o valor numérico dessa instância na representação da cadeia de caracteres equivalente.

ToString(IFormatProvider)

Converte o valor numérico dessa instância na representação da cadeia de caracteres equivalente usando as informações de formato específicas da cultura.

ToString(String)

Converte o valor numérico dessa instância na representação da cadeia de caracteres equivalente usando o formato especificado.

ToString(String, IFormatProvider)

Converte o valor numérico dessa instância na representação da cadeia de caracteres equivalente usando o formato especificado e as informações de formato específicas da cultura especificada.

ToUInt16(Decimal)

Converte o valor do Decimal especificado no inteiro sem sinal de 16 bits equivalente.

ToUInt32(Decimal)

Converte o valor do Decimal especificado no inteiro sem sinal de 32 bits equivalente.

ToUInt64(Decimal)

Converte o valor do Decimal especificado no inteiro sem sinal de 64 bits equivalente.

Truncate(Decimal)

Retorna os dígitos integrais do Decimal especificado; todos os dígitos fracionários são descartados.

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

Tenta formatar o valor da instância atual como UTF-8 no intervalo de bytes fornecido.

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

Tenta formatar o valor da instância decimal atual para o intervalo de caracteres fornecido.

TryGetBits(Decimal, Span<Int32>, Int32)

Tenta converter o valor de uma instância especificada de Decimal para a representação binária equivalente.

TryParse(ReadOnlySpan<Byte>, Decimal)

Tenta converter um intervalo de caracteres UTF-8 que contém a representação de cadeia de caracteres de um número em seu equivalente decimal assinado.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, Decimal)

Tenta analisar um intervalo de caracteres UTF-8 em um valor.

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

Tenta analisar um intervalo de caracteres UTF-8 em um valor.

TryParse(ReadOnlySpan<Char>, Decimal)

Converte a representação de intervalo de um número em seu equivalente de Decimal usando o formato específico da cultura e estilo especificados. Um valor retornado indica se a conversão foi bem-sucedida ou falhou.

TryParse(ReadOnlySpan<Char>, IFormatProvider, Decimal)

Tenta analisar um intervalo de caracteres em um valor.

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

Converte a representação de intervalo de um número em seu equivalente de Decimal usando o formato específico da cultura e estilo especificados. Um valor retornado indica se a conversão foi bem-sucedida ou falhou.

TryParse(String, Decimal)

Converte a representação da cadeia de caracteres de um número no Decimal equivalente. Um valor retornado indica se a conversão foi bem-sucedida ou falhou.

TryParse(String, IFormatProvider, Decimal)

Tenta analisar uma cadeia de caracteres em um valor.

TryParse(String, NumberStyles, IFormatProvider, Decimal)

Converte a representação de cadeia de caracteres de um número em seu Decimal equivalente usando o formato específico da cultura e estilo especificados. Um valor retornado indica se a conversão foi bem-sucedida ou falhou.

Operadores

Addition(Decimal, Decimal)

Soma dois valores Decimal especificados.

Decrement(Decimal)

Diminui o operando Decimal em um.

Division(Decimal, Decimal)

Divide dois valores Decimal especificados.

Equality(Decimal, Decimal)

Retorna um valor que indica se dois valores Decimal são iguais.

Explicit(Decimal to Byte)

Define uma conversão explícita de um Decimal para um inteiro sem sinal de 8 bits.

Explicit(Decimal to Char)

Define uma conversão explícita de um Decimal para um caractere Unicode.

Explicit(Decimal to Double)

Define uma conversão explícita de um Decimal para um número de ponto flutuante de precisão dupla.

Explicit(Decimal to Int16)

Define uma conversão explícita de um Decimal em um inteiro com sinal de 16 bits.

Explicit(Decimal to Int32)

Define uma conversão explícita de um Decimal para um inteiro com sinal de 32 bits.

Explicit(Decimal to Int64)

Define uma conversão explícita de um Decimal em um inteiro com sinal de 64 bits.

Explicit(Decimal to SByte)

Define uma conversão explícita de um Decimal para um inteiro com sinal de 8 bits.

Esta API não compatível com CLS.

Explicit(Decimal to Single)

Define uma conversão explícita de um Decimal em um número de ponto flutuante de precisão simples.

Explicit(Decimal to UInt16)

Define uma conversão explícita de um Decimal em um inteiro sem sinal de 16 bits.

Esta API não compatível com CLS.

Explicit(Decimal to UInt32)

Define uma conversão explícita de um Decimal em um inteiro sem sinal de 32 bits.

Esta API não compatível com CLS.

Explicit(Decimal to UInt64)

Define uma conversão explícita de um Decimal em um inteiro sem sinal de 64 bits.

Esta API não compatível com CLS.

Explicit(Double to Decimal)

Define uma conversão explícita de um número de ponto flutuante de precisão dupla como um Decimal.

Explicit(Single to Decimal)

Define uma conversão explícita de um número de ponto flutuante de precisão simples para um Decimal.

GreaterThan(Decimal, Decimal)

Retorna um valor que indica se um Decimal especificado é maior que outro Decimal especificado.

GreaterThanOrEqual(Decimal, Decimal)

Retorna um valor que indica se um Decimal especificado é maior ou igual a outro Decimal especificado.

Implicit(Byte to Decimal)

Define uma conversão implícita de um inteiro sem sinal de 8 bits em um Decimal.

Implicit(Char to Decimal)

Define uma conversão implícita de um caractere Unicode para um Decimal.

Implicit(Int16 to Decimal)

Define uma conversão implícita de um inteiro com sinal de 16 bits em um Decimal.

Implicit(Int32 to Decimal)

Define uma conversão implícita de um inteiro com sinal de 32 bits em um Decimal.

Implicit(Int64 to Decimal)

Define uma conversão implícita de um inteiro com sinal de 64 bits em um Decimal.

Implicit(SByte to Decimal)

Define uma conversão implícita de um inteiro com sinal de 8 bits em um Decimal.

Esta API não compatível com CLS.

Implicit(UInt16 to Decimal)

Define uma conversão implícita de um inteiro sem sinal de 16 bits em um Decimal.

Esta API não compatível com CLS.

Implicit(UInt32 to Decimal)

Define uma conversão implícita de um inteiro sem sinal de 32 bits em um Decimal.

Esta API não compatível com CLS.

Implicit(UInt64 to Decimal)

Define uma conversão implícita de um inteiro sem sinal de 64 bits em um Decimal.

Esta API não compatível com CLS.

Increment(Decimal)

Incrementa o operando Decimal em 1.

Inequality(Decimal, Decimal)

Retorna um valor que indica se dois objetos Decimal têm valores diferentes.

LessThan(Decimal, Decimal)

Retorna um valor que indica se um Decimal especificado é menor que outro Decimal especificado.

LessThanOrEqual(Decimal, Decimal)

Retorna um valor que indica se um Decimal especificado é menor ou igual a outro Decimal especificado.

Modulus(Decimal, Decimal)

Retorna o resto da divisão de dois valores Decimal especificados.

Multiply(Decimal, Decimal)

Multiplica dois valores Decimal especificados.

Subtraction(Decimal, Decimal)

Subtrai dois valores Decimal especificados.

UnaryNegation(Decimal)

Nega o valor do operando Decimal especificado.

UnaryPlus(Decimal)

Retorna o valor do operando Decimal (o sinal do operando é inalterado).

Implantações explícitas de interface

IAdditiveIdentity<Decimal,Decimal>.AdditiveIdentity

Obtém a identidade aditiva do tipo atual.

IComparable.CompareTo(Object)

Compara a instância atual com outro objeto do mesmo tipo e retorna um inteiro que indica se a instância atual precede, segue ou ocorre na mesma posição da ordem de classificação do outro objeto.

IConvertible.GetTypeCode()

Retorna o TypeCode para essa instância.

IConvertible.ToBoolean(IFormatProvider)

Para obter uma descrição desse membro, confira ToBoolean(IFormatProvider).

IConvertible.ToByte(IFormatProvider)

Para obter uma descrição desse membro, confira ToByte(IFormatProvider).

IConvertible.ToChar(IFormatProvider)

Não há suporte para esta conversão. A tentativa de usar esse método lança um InvalidCastException.

IConvertible.ToDateTime(IFormatProvider)

Não há suporte para esta conversão. A tentativa de usar esse método lança um InvalidCastException.

IConvertible.ToDecimal(IFormatProvider)

Para obter uma descrição desse membro, confira ToDecimal(IFormatProvider).

IConvertible.ToDouble(IFormatProvider)

Para obter uma descrição desse membro, confira ToDouble(IFormatProvider).

IConvertible.ToInt16(IFormatProvider)

Para obter uma descrição desse membro, confira ToInt16(IFormatProvider).

IConvertible.ToInt32(IFormatProvider)

Para obter uma descrição desse membro, confira ToInt32(IFormatProvider).

IConvertible.ToInt64(IFormatProvider)

Para obter uma descrição desse membro, confira ToInt64(IFormatProvider).

IConvertible.ToSByte(IFormatProvider)

Para obter uma descrição desse membro, confira ToSByte(IFormatProvider).

IConvertible.ToSingle(IFormatProvider)

Para obter uma descrição desse membro, confira ToSingle(IFormatProvider).

IConvertible.ToType(Type, IFormatProvider)

Para obter uma descrição desse membro, confira ToType(Type, IFormatProvider).

IConvertible.ToUInt16(IFormatProvider)

Para obter uma descrição desse membro, confira ToUInt16(IFormatProvider).

IConvertible.ToUInt32(IFormatProvider)

Para obter uma descrição desse membro, confira ToInt32(IFormatProvider).

IConvertible.ToUInt64(IFormatProvider)

Para obter uma descrição desse membro, confira ToInt64(IFormatProvider).

IDeserializationCallback.OnDeserialization(Object)

Executado quando a desserialização de um objeto foi concluída.

IFloatingPoint<Decimal>.GetExponentByteCount()

Obtém o número de bytes que serão gravados como parte de TryWriteExponentLittleEndian(Span<Byte>, Int32).

IFloatingPoint<Decimal>.GetExponentShortestBitLength()

Obtém o comprimento, em bits, da representação complementar dos dois mais curtos do expoente atual.

IFloatingPoint<Decimal>.GetSignificandBitLength()

Obtém o comprimento, em bits, do significando atual.

IFloatingPoint<Decimal>.GetSignificandByteCount()

Obtém o número de bytes que serão gravados como parte de TryWriteSignificandLittleEndian(Span<Byte>, Int32).

IFloatingPoint<Decimal>.TryWriteExponentBigEndian(Span<Byte>, Int32)

Tenta gravar o expoente atual, no formato big-endian, em um determinado intervalo.

IFloatingPoint<Decimal>.TryWriteExponentLittleEndian(Span<Byte>, Int32)

Tenta gravar o expoente atual, no formato little-endian, em um determinado intervalo.

IFloatingPoint<Decimal>.TryWriteSignificandBigEndian(Span<Byte>, Int32)

Tenta gravar o significando atual, no formato big-endian, em um determinado intervalo.

IFloatingPoint<Decimal>.TryWriteSignificandLittleEndian(Span<Byte>, Int32)

Tenta gravar o significando atual, no formato little-endian, em um determinado intervalo.

IFloatingPointConstants<Decimal>.E

Obtém a constante ematemática .

IFloatingPointConstants<Decimal>.Pi

Obtém a constante pimatemática .

IFloatingPointConstants<Decimal>.Tau

Obtém a constante taumatemática .

IMinMaxValue<Decimal>.MaxValue

Obtém o valor máximo do tipo atual.

IMinMaxValue<Decimal>.MinValue

Obtém o valor mínimo do tipo atual.

IMultiplicativeIdentity<Decimal,Decimal>.MultiplicativeIdentity

Obtém a identidade multiplicativa do tipo atual.

INumber<Decimal>.MaxNumber(Decimal, Decimal)

Compara dois valores com a computação, que é maior e retorna o outro valor se uma entrada for NaN.

INumber<Decimal>.MinNumber(Decimal, Decimal)

Compara dois valores com a computação, que é menor e retorna o outro valor se uma entrada for NaN.

INumberBase<Decimal>.IsComplexNumber(Decimal)

Determina se um valor representa um número complexo.

INumberBase<Decimal>.IsFinite(Decimal)

Determina se um valor é finito.

INumberBase<Decimal>.IsImaginaryNumber(Decimal)

Determina se um valor representa um número imaginário puro.

INumberBase<Decimal>.IsInfinity(Decimal)

Determina se um valor é infinito.

INumberBase<Decimal>.IsNaN(Decimal)

Determina se um valor é NaN.

INumberBase<Decimal>.IsNegativeInfinity(Decimal)

Determina se um valor é infinito negativo.

INumberBase<Decimal>.IsNormal(Decimal)

Determina se um valor é normal.

INumberBase<Decimal>.IsPositiveInfinity(Decimal)

Determina se um valor é infinito positivo.

INumberBase<Decimal>.IsRealNumber(Decimal)

Determina se um valor representa um número real.

INumberBase<Decimal>.IsSubnormal(Decimal)

Determina se um valor é subnormal.

INumberBase<Decimal>.IsZero(Decimal)

Determina se um valor é zero.

INumberBase<Decimal>.MaxMagnitudeNumber(Decimal, Decimal)

Compara dois valores com a computação que tem a magnitude maior e retorna o outro valor se uma entrada for NaN.

INumberBase<Decimal>.MinMagnitudeNumber(Decimal, Decimal)

Compara dois valores com a computação que tem a magnitude menor e retorna o outro valor se uma entrada é NaN.

INumberBase<Decimal>.One

Obtém o valor 1 do tipo.

INumberBase<Decimal>.Radix

Obtém a base para o tipo.

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

Representa um número de ponto flutuante decimal.

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

Representa um número de ponto flutuante decimal.

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

Representa um número de ponto flutuante decimal.

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

Tenta converter uma instância do tipo atual em outro tipo, gerando uma exceção de estouro para quaisquer valores que estejam fora do intervalo representável do tipo atual.

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

Tenta converter uma instância do tipo atual em outro tipo, saturando todos os valores que estão fora do intervalo representável do tipo atual.

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

Tenta converter uma instância do tipo atual em outro tipo, truncando quaisquer valores que estejam fora do intervalo representável do tipo atual.

INumberBase<Decimal>.Zero

Obtém o valor 0 do tipo.

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Popula um SerializationInfo com os dados necessários para serializar o objeto de destino.

ISignedNumber<Decimal>.NegativeOne

Obtém o valor -1 do tipo.

Aplica-se a

Acesso thread-safe

Todos os membros desse tipo são thread-safe. Os membros que aparentam modificar efetivamente o estado retornam uma nova instância inicializada com o novo valor. Assim como acontece com qualquer outro tipo, a leitura e a gravação em uma variável compartilhada que contém uma instância desse tipo devem ser protegidas por um bloqueio para garantir thread-safe.

Confira também