How to safely convert from a double to a decimal in c#
<p>We are storing financial data in a SQL Server database using the decimal data type and we need 6-8 digits of precision in the decimal.  When we get this value back through our data access layer into our C# server, it is coming back as the decimal data type.</p>

<p>Due to some design constraints that are beyond my control, this needs to be converted.  Converting to a string isn't a problem.  Converting to a double is as the MS documentation says "[converting from decimal to double] can produce round-off errors because a double-precision floating-point number has fewer significant digits than a decimal."</p>

<p>As the double (or string) we can round to 2 decimal places after any calculations are done, so what is the "right" way to do the decimal conversion to ensure that we don't lose any precision before the rounding?</p>
