title: Best way to get whole number part of a Decimal number
body: <p>What is the best way to return the whole number part of a decimal (in c#)? (This has to work for very large numbers that may not fit into an int). </p>
  
  <pre><code>GetIntPart(343564564.4342) &gt;&gt; 343564564
  GetIntPart(-323489.32) &gt;&gt; -323489
  GetIntPart(324) &gt;&gt; 324
  </code></pre>
  
  <p>The purpose of this is: I am inserting into a decimal (30,4) field in the db, and want to ensure that I do not try to insert a number than is too long for the field. Determining the length of the whole number part of the decimal is part of this operation.</p>