This method is used to get the result of multiplying the specified Decimal value by negative one.
Syntax: public static decimal Negate (decimal a);
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
The negative value is : -127.97
Example 2: When a is negative
The value is : 12.39
Example 3: If a is zero.
The Negate value is : 0.00
- Difference between Method Overriding and Method Hiding in C#
- C# | Math.Log() Method
- Queue.Contains() Method in C#
- DateTime.Add() Method in C#
- Extension Method in C#
- C# | IsNullOrEmpty() Method
- Stack.Contains() Method in C#
- Stack.Pop() Method in C#
- C# | StartsWith() Method
- C# | Replace() Method
- C# | Join() Method | Set - 1
- C# | Remove() Method
- C# | PadLeft() Method
- C# | Math.Pow() Method
- C# | Trim() Method
- C# | Join Method | Set - 2
- C# | CopyTo() Method
- Main Method in C#
- C# | Insert() Method
- C# | ToCharArray() Method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.