title: Convert SqlDecimal to Decimal
body: <p>The problem is that the SqlDecimal datatype packs more bits than the Decimal datatype which is native to the CLR. So how does one map between the two in the most practical way. This wohn't work that well:</p>
  
  <pre><code>SqlDecimal x = ...
  decimal z = x.value; // can overflow
  </code></pre>
  
  <p>To have more numbers pass one can strip trailing zeros. But if you accept the loss of precision that the conversion gives you one would expect there'd be a function to do this lossy conversion.</p>
  
  <p>Is there? Or what would be best practices here?</p>
  
  <p>I've already made a function which both crops and removes trailing zeroes to do the conversion but I'd rather use a standard .NET BCL function if one such exists.</p>