title: Round decimal number to smaller number
body: <p>With <a href="https://docs.microsoft.com/en-us/dotnet/api/system.decimal.round?view=netcore-2.0#System_Decimal_Round_System_Decimal_System_Int32_System_MidpointRounding_" rel="nofollow noreferrer">Decimal.Round</a>, I can only choose between <code>ToEven</code> and <code>AwayFromZero</code>, now I'd like to round it always to the smaller number, that is, like truncating, remove the digits that is out of the required decimals:</p>
  
  <pre><code>public static void Main()
  {
      Console.WriteLine("{0,-10} {1,-10} {2,-10}", "Value", "ToEven", "AwayFromZero");
      for (decimal value = 12.123451m; value &lt;= 12.123459m; value += 0.000001m)
          Console.WriteLine("{0} -- {1} -- {2}", value, Math.Round(value, 5, MidpointRounding.ToEven),
                         Math.Round(value, 5, MidpointRounding.AwayFromZero));
  }
  
  // output
  12.123451 -- 12.12345 -- 12.12345
  12.123452 -- 12.12345 -- 12.12345
  12.123453 -- 12.12345 -- 12.12345
  12.123454 -- 12.12345 -- 12.12345
  12.123455 -- 12.12346 -- 12.12346
  12.123456 -- 12.12346 -- 12.12346
  12.123457 -- 12.12346 -- 12.12346
  12.123458 -- 12.12346 -- 12.12346
  12.123459 -- 12.12346 -- 12.12346
  </code></pre>
  
  <p>I just want all those to be rounded to <code>12.12345</code>, that is keep 5 decimals, and truncating remaining ones. Is there a better way to do this?</p>