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 number which is to be truncated.
Return Value: It returns the result of d rounded toward zero, to the nearest whole number.
The integral part of dec1 is: 214748 The integral part of dec2 is: 21458565
- Difference between Method Overriding and Method Hiding in C#
- C# | Join Method | Set - 2
- C# | Method Overriding
- DateTimeOffset.Add() Method in C#
- C# | Join() Method | Set - 1
- Method Hiding in C#
- C# | Math.Pow() Method
- C# | Math.Min() Method
- C# | Math.Max() Method
- C# | Method Parameters
- Decimal.Add() Method in C#
- C# | Math.Abs() Method | Set - 2
- C# | Math.Abs() Method | Set - 1
- C# | Math.Exp() Method
- C# | PadLeft() 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 firstname.lastname@example.org. 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.