Rounds a decimal value to the closest integer towards negative infinity.
- d
- The decimal to round downward.
A decimal value v such that v is an integer and d - 1 < v <= d . The scale of the result will be zero.
Documentation for this section has not yet been entered.
The following example demonstrates the decimal.Floor(decimal) method.
C# Example
using System; class DecimalTest { public static void Main() { Console.WriteLine("floor {0} is {1}", 3.14159m, Decimal.Floor(3.14159m)); Console.WriteLine("floor {0} is {1}", -3.9m, Decimal.Floor(-3.9m)); Console.WriteLine("floor {0} is {1}", 3.0m, Decimal.Floor(3.0m)); } }The output is
floor 3.14159 is 3
floor -3.9 is -4
floor 3.0 is 3
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0