Decimal.Negate() Method in C# Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 csharp // C# program to demonstrate the // Decimal.Negate(Decimal) Method using System; using System.Globalization; class GFG { // Main Method public static void Main() { // Declaring the decimal variable Decimal a = 127.97m; // using Negate() method; Decimal value = Decimal.Negate(a); // Display the negative value Console.WriteLine("The negative value "+ "is : {0}", value); } } Output: The negative value is : -127.97 Example 2: When a is negative csharp // C# program to demonstrate the // Decimal.Negate(Decimal) Method using System; using System.Globalization; class GFG { // Main Method public static void Main() { // Declaring the decimal variable Decimal a = -12.39m; // using Negate() method; Decimal value = Decimal.Negate(a); // Display the value after // using negate method Console.WriteLine("The value is : {0}", value); } } Output: The value is : 12.39 Example 3: If a is zero. csharp // C# program to demonstrate the // Decimal.Negate(Decimal) Method using System; using System.Globalization; class GFG { // Main Method public static void Main() { // Declaring the decimal variable Decimal a = 0.00m; // using Negate() method; Decimal value = Decimal.Negate(a); // Display the Negate value Console.WriteLine("The Negate value "+ "is : {0}", value); } } Output: The Negate value is : 0.00 Reference: https://learn.microsoft.com/en-us/dotnet/api/system.decimal.negate?view=netframework-4.7.2 Comment More infoAdvertise with us Next Article Decimal.Round() Method in C# | Set - 1 I IshwarGupta Follow Improve Article Tags : C# CSharp-method CSharp-Decimal-Struct Similar Reads Decimal.Truncate() Method in C# This method is used to get the integral digits of the specified Decimal by discarding any fractional digits. This method rounds the specified value to the nearest whole number by removing the digits after the decimal point. Syntax: public static decimal Truncate (decimal d); Here, d is the decimal n 1 min read Decimal.ToSingle() Method in C# This method is used to convert the value of the specified Decimal to the equivalent single-precision floating-point number. This method can produce round-off errors as a single-precision floating-point number has few significant digits than a Decimal. Syntax: public static float ToSingle (decimal d) 1 min read Decimal.ToSByte() Method in C# This method is used to convert the value of the specified Decimal to the equivalent 8-bit signed integer. A user can also convert a Decimal value to an 8-bit integer by using the Explicit assignment operator. Syntax: public static sbyte ToSByte (decimal value); Here, the value is the decimal number 2 min read Decimal.Subtract() Method in C# This method is used to subtract the one specified Decimal value from another. Syntax: public static decimal Subtract (decimal a1, decimal a2); Parameters: a1: This parameter specifies the minuend. a2: This parameter specifies the subtrahend. Return Value: Result of subtracting a2 from a1. Exceptions 2 min read Decimal.Round() Method in C# | Set - 1 Decimal.Round Method is used to round a value to the nearest integer or a specified number of decimal places. There are 4 methods in the overload list of this method as follows: Round(Decimal) Method Round(Decimal, Int32) Method Round(Decimal, MidpointRounding) Method Round(Decimal, Int32, MidpointR 3 min read Decimal.ToUInt32() Method in C# This method is used to convert the value of the specified Decimal to the equivalent 32-bit unsigned integer. A user can also convert a Decimal value to a 32-bit unsigned integer by using the Explicit assignment operator. Syntax: public static uint ToUInt32 (decimal d); Here, the d is the decimal num 2 min read Like