VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/decimal-negate-method-in-c-sharp/

⇱ Decimal.Negate() Method in C# - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Decimal.Negate() Method in C#

Last Updated : 11 Jul, 2025
This method is used to get the result of multiplying the specified Decimal value by negative one.
Syntax: public static decimal Negate (decimal a); Parameter: a: This parameter specifies the decimal which will be converted. Return Value: A decimal number with the value of a, but the opposite sign. But zero, if a is zero.
Below programs illustrate the use of Decimal.Negate(Decimal) Method: Example 1: When a is positive
Output:
The negative value is : -127.97
Example 2: When a is negative
Output:
The value is : 12.39
Example 3: If a is zero.
Comment
Article Tags:

Explore